求 宝塔线 公式 [通达信]
-
咨询内容:
- 咨询内容:所以求一个官方公式。
来源:C X H 9 9 .C O M )
-
通达信技术部:
加密公式,不对外呢
-
通达信客服:
我有欢迎交流宝塔线公式拿去 研究欢迎改进转载注意出处通达信论坛KxMP原创指标C,NODRAW;/z4p,f4)&&varu,ref(ff1,1),ff2,2,0),colorfce668;>/z4p1;
VARU:=C>REF(C,1) AND C>REF(C,2);
VARD:=C
CU:=REF(VARD,1) AND VARU; {蓝>红}
CD:=REF(VARU,1) AND VARD; {红>蓝}
{TEST};
DISUP:BARSLAST(VARU),NODRAW,COLORGRAY; {红突破距离}
DISDN:BARSLAST(VARD) ,NODRAW,COLORGRAY; {蓝突破距离}
{UD1:=BARSLAST(VARU||DISUP
DD1:=BARSLAST(VARD||DISUP>DISDN),NODRAW;}
ZZ:=IF(C>REF(C,1),1,IF(CFF1:=IF(ZZ,C,IF(ZZ=0,REF(C,1),0)); {纯色顶}
FF2:=IF(ZZ,REF(C,1),IF(ZZ=0,C,0)); {纯色底} {老FF勿删}
TT:=NOT(VARD)&&NOT(VARU),NODRAW,COLORC0C0C0; {开始横}
TT1:=BARSLAST(TT=0),NODRAW; {累计横次数}
TTU:=REF(VARU,TT1); {TT1>0&&TTU = UU}
TTD:=REF(VARD,TT1); {TT1>0&&TTD = DD}
UU:TT1>0&&TTU,NODRAW; {红横}
DD:TT1>0&&TTD,NODRAW; {蓝横}
DDA:=TT&&DISUP>DISDN,NODRAW,COLORGRAY; {蓝横} {老DD和UU}
UUA:=TT&&DISUP
DD1:=BARSLAST(DD<>1); {累计蓝横次数}
UU1:=BARSLAST(UU<>1); {累计红横次数}
DD2:=BARSLAST(DD);
UU2:=BARSLAST(UU);
DUD:=REF(BARSLAST(UU||DD),TT1)+TT1; {上次横到现在横的距离}
{连续震 判断}
F0:=(VARU=REF(VARU,1))||(VARD=REF(VARD,1));
F33:=IF(DISUPF34:=IF(DISUP>DISDN,1,0); {F1 F2增强版}
F35:=IF(UU2F36:=IF(UU2>DD2,1,0);
F3:=(VARU<>REF(VARU,1)||VARD<>REF(VARD,1))&&VARD<>VARU; {另类F3}
{F3:=F33<>REF(F33,1)&&F34<>REF(F34,1); {连续震} {老F3勿删}
{F3Z:=F1&&F2&&NOT(UU||DD); {连续震开始 已经起码走了2个}
{F4:=BARSLAST(F3=0); {记录连续F3累计值}
F4:IF(F3=0&&REF(F3>0,TT1),TT1+REF(BARSLAST(F3=0),TT1),BARSLAST(F3=0)),COLORWHITE,NODRAW; {不依赖F4}
VUP:=REF(VARU||UU,F4),NODRAW; {连震开头前}
VDN:=REF(VARD||DD,F4),NODRAW; {连震开头前}
VUP1:=REF(UU,F4),NODRAW; {任何状态的开头前一个涨}
VDN1:=REF(DD,F4),NODRAW; {任何状态的开头前一个跌}
F5:=IF(REF(VUP,BARSLAST(F4=0)),REF(FF2,BARSLAST(F4=0)),
IF(REF(VDN,BARSLAST(F4=0)),REF(FF1,BARSLAST(F4=0)),0)); {连续震死分界 遇到EX1不会更新}
EX0:=REF(ZZ,F4)=REF(ZZ,F4-1); {第一破跟前面柱子方向一样}
EX3:=REF(ZZ=-1,F4); {震前平线}
{纯色顶底价}
HFF1:=IF((UU||DD)&&ZZ,C,REF(C,1));
HFF2:=IF((UU||DD)&&ZZ=0,C,REF(C,1));
FFA:=ZZ=REF(ZZ,1)&&REF((UU||DD),1);
{FF1:=IF(VARU||VARD,FF1A,IF(UU||DD,HFF1,0));
FF2:=IF(VARU||VARD,FF2A,IF(UU||DD,HFF2,0));}
FF1N:=IF(ZZ,C,IF(FFA&&ZZ=0,MAX(REF(C,2),REF(C,1)),REF(C,1))); {纯色顶} {新FF}
FF2N:=IF(ZZ=0,C,IF(FFA&&ZZ,MIN(REF(C,2),REF(C,1)),REF(C,1))); {纯色底}
Z1:=IF(VUP,1,0),NODRAW; {红1 蓝0}
Z2:=IF(Z1=0,REF(FF1,F4),0),NODRAW; {蓝分界}
Z3:=IF(Z1,REF(FF2,F4),0),NODRAW; {红分界}
Z4:I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4,F4),
IF(BARSLAST(EX0=0)=F4&&REF(UU||DD,F4)&&REF(ZZ=-1,F4)=0,REF(C,F4),Z4)); {修复EX1画线}
{REF((VARU||VARD)&&REF(UU||DD,1)&&EX0=0,F4-1) EX1规则}
{排除}
EX1:=(VARU||VARD)&&REF(Z4C,1)&&ZZ=REF(ZZ,1); {反转前面有彩色UU/DD 无需补色} {纯色}
EX2:=REF(Z4C,1)&&ZZ<>REF(ZZ,1); {反转前面有彩色UU/DD 需补色}
AC1:=REF(UU3&&Z4C=0,1)&&VARU; {补色规则 反色UU+VARU 补蓝色}
AC2:=REF(DD3&&Z4C=0,1)&&VARD;
STICKLINE(REF(DD3=0,1)&&FF1>=Z4P&&FF2STICKLINE(REF(UU3=0,1)&&FF1>Z4P&&FF2
STICKLINE(REF(DD&&Z4C=0&&DD3=0,1)&&VARU&&F4<=1||AC1,REF(FF2,1),REF(FF1,1),2,0),COLORFCE668; {VARU补蓝}
STICKLINE(FF1<=Z4P,FF1,FF2,2,0),COLORFCE668; {单色}
STICKLINE(FF2>=Z4P,FF1,FF2,2,1),COLORRED; {单色}
STICKLINE(REF(UU&&Z4C=0&&UU3=0,1)&&VARD&&F4<=1||AC2,REF(FF2,1),REF(FF1,1),2,1),COLORRED; {VARD补红};
STICKLINE(ZZ=-1&&(DD||REF(Z4C&&(UU||DD)&&ZZ=0,1)),FF1,FF2,2,0),COLORFCE668; {平线}
STICKLINE(ZZ=-1&&(UU||REF(Z4C&&(UU||DD)&&ZZ,1)),FF1,FF2,2,1),COLORRED; {平线}
STICKLINE(REF(ZZ=-1&&DD&&FF1STICKLINE(REF(ZZ=-1&&UU,F4)&&VARD,REF(FF1,1),FF1,2,1),COLORRED; {平线}
{STICKLINE(VARD&&F4<=1&&NOT(EX2),Z4,FF2,2,0),COLORFCE668; {蓝}
{STICKLINE(VARU&&F4<=1&&NOT(EX2),FF1,Z4,2,1),COLORRED; {红};
{STICKLINE(DD4&&REF(CUD=0,2)&&F4>2,FF1,FF2,2,0),COLORFCE668; {DD} {勿删}
{STICKLINE(UU4&&REF(CUD=0,2)&&F4>2,FF1,FF2,2,1),COLORRED; {UU} {勿删};
{--------TEST--------}
PB:=(FF1A
PR:=(FF2A>REF(FF1A,1)||FF2A>REF(FF1A,2))&&(VARU||UU);
PA:=PR||PB;
{NC:=IF(PB,FF1,
IF(PR,FF2,
IF(UU&&REF(PR,TT1),FF2,
IF(DD&&REF(PB,TT1),FF1,0))));
{纯色新方法};
{IF(REF(Z4C,F4)&&REF(ZZ,F4)<>REF(ZZ,F4-1),REF(Z4,F4),DRAWNULL); {前彩色}
{IF(REF(Z4C=0,F4)&&REF(DD&&FF2>=Z4,F4),REF(FF2,F4),
IF(REF(Z4C=0,F4)&&REF(UU&&FF1<=Z4,F4),REF(FF1,F4),DRAWNULL)); {反色UUDD};
/dd2,1,0);>/ref(c,1)> -
网友交流:
-
网友交流:
效果展示
其实就是个二价线
有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友
可联系技术人员 QQ: 262069696 或微信号:cxh99cxh99 进行 有偿收费 编写!
(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
相关文章
-
没有相关内容