通达信龙妖208战法 抓龙头就是这么简单 主图指标
M20:MA(C,20),COLORRED,LINETHICK2;
T1:=REF(CROSS(C,MA(C,20)),3) AND EVERY(C>MA(C,20),4);
N1:=BARSLAST(CROSS(C,MA(C,20)) AND REF(EVERY(C<MA(C,20),4),1));
CS:=COUNT(H>REF(H,1) AND H=HHV(H,N1),N1);
T2:=COUNT(EVERY(C<MA(C,20),4),N1)=0;
JS:=IF(REF(H>REF(H,1),N1) AND T2,CS+1,IF(REF(H<=REF(H,1),N1) AND T2,CS,0));
M8:=BARSNEXT(JS=8);
MM8:=BARSNEXT(EVERY(C<MA(C,20),4));
M7:=BARSNEXT(JS=7);
M6:=BARSNEXT(JS=6);
M5:=BARSNEXT(JS=5);
M4:=BARSNEXT(JS=4);
M3:=BARSNEXT(JS=3);
M2:=BARSNEXT(JS=2);
M1:=BARSNEXT(JS=1);
TT1:=(MM8>M8 OR MM8=DRAWNULL) AND M1=0 AND M1<M2 AND M2<M3 AND M3<M4 AND M4<M5 AND M5<M6 AND M6<M7 AND M7<M8;
TT2:=(MM8>M8 OR MM8=DRAWNULL) AND M2=0 AND M2<M3 AND M3<M4 AND M4<M5 AND M5<M6 AND M6<M7 AND M7<M8;
TT3:=(MM8>M8 OR MM8=DRAWNULL) AND M3=0 AND M3<M4 AND M4<M5 AND M5<M6 AND M6<M7 AND M7<M8;{分析家公式网HTTP://WWW.70822.COM}
TT4:=(MM8>M8 OR MM8=DRAWNULL) AND M4=0 AND M4<M5 AND M5<M6 AND M6<M7 AND M7<M8;
TT5:=(MM8>M8 OR MM8=DRAWNULL) AND M5=0 AND M5<M6 AND M6<M7 AND M7<M8;
TT6:=(MM8>M8 OR MM8=DRAWNULL) AND M6=0 AND M6<M7 AND M7<M8;
TT7:=(MM8>M8 OR MM8=DRAWNULL) AND M7=0 AND M7<M8;
TT8:=(MM8>M8 OR MM8=DRAWNULL) AND M8=0;
DRAWNUMBER(BARSLASTCOUNT(TT1)=1,H*1.07,1),COLORYELLOW;
DRAWNUMBER(BARSLASTCOUNT(TT2)=1,H*1.07,2),COLORYELLOW;
DRAWNUMBER(BARSLASTCOUNT(TT3)=1,H*1.07,3),COLORYELLOW;
DRAWNUMBER(BARSLASTCOUNT(TT4)=1,H*1.07,4),COLORYELLOW;
DRAWNUMBER(BARSLASTCOUNT(TT5)=1,H*1.07,5),COLORYELLOW;
DRAWNUMBER(BARSLASTCOUNT(TT6)=1,H*1.07,6),COLORYELLOW;
DRAWNUMBER(BARSLASTCOUNT(TT7)=1,H*1.07,7),COLORYELLOW;
DRAWNUMBER(BARSLASTCOUNT(TT8)=1,H*1.07,8),COLORYELLOW;
未来函数检测结果如下:
该公式包含未来函数:BARSNEXT
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
输出M20:C的20日简单移动平均,画红色, 线宽为2
T1赋值:REF(CROSS(C,C的20日简单移动平均),3) AND EVERY(C>C的20日简单移动平均,4)
N1赋值:上次CROSS(C,C的20日简单移动平均距今天数 AND REF(EVERY(C
CS赋值:COUNT(H>1日前的H AND H=N1日内H最高值,N1)
T2赋值:COUNT(EVERY(C
JS赋值:IF(1日前的H>H,N1) AND T2,CS+1,IF(1日前的H<=H,N1) AND T2,CS,0))
M8赋值:BARSNEXT(JS=8)
MM8赋值:BARSNEXT(EVERY(C
M7赋值:BARSNEXT(JS=7)
M6赋值:BARSNEXT(JS=6)
M5赋值:BARSNEXT(JS=5)
M4赋值:BARSNEXT(JS=4)
M3赋值:BARSNEXT(JS=3)
M2赋值:BARSNEXT(JS=2)
M1赋值:BARSNEXT(JS=1)
TT1赋值:(MM8>M8 OR MM8=DRAWNULL) AND M1=0 AND M1
TT2赋值:(MM8>M8 OR MM8=DRAWNULL) AND M2=0 AND M2
TT3赋值:(MM8>M8 OR MM8=DRAWNULL) AND M3=0 AND M3{分析家公式网HTTP://WWW.70822.COM}
TT4:=(MM8>M8 OR MM8=DRAWNULL) AND M4=0 AND M4
TT5赋值:(MM8>M8 OR MM8=DRAWNULL) AND M5=0 AND M5
TT6赋值:(MM8>M8 OR MM8=DRAWNULL) AND M6=0 AND M6
TT7赋值:(MM8>M8 OR MM8=DRAWNULL) AND M7=0 AND M7
TT8赋值:(MM8>M8 OR MM8=DRAWNULL) AND M8=0
DRAWNUMBER(BARSLASTCOUNT(TT1)=1,H*1.07,1),画黄色
DRAWNUMBER(BARSLASTCOUNT(TT2)=1,H*1.07,2),画黄色
DRAWNUMBER(BARSLASTCOUNT(TT3)=1,H*1.07,3),画黄色
DRAWNUMBER(BARSLASTCOUNT(TT4)=1,H*1.07,4),画黄色
DRAWNUMBER(BARSLASTCOUNT(TT5)=1,H*1.07,5),画黄色
DRAWNUMBER(BARSLASTCOUNT(TT6)=1,H*1.07,6),画黄色
DRAWNUMBER(BARSLASTCOUNT(TT7)=1,H*1.07,7),画黄色
DRAWNUMBER(BARSLASTCOUNT(TT8)=1,H*1.07,8),画黄色