无语 通达信 主图 源码 附图
N:=10;
T1:=CONST(LLVBARS(LOW,N));
T1HIGH:=CONST(REF(HIGH,T1));
CC:=CONST(CURRBARSCOUNT);
T2:=CONST(BARSLAST((CURRBARSCOUNT >(CC+T1)) AND (HIGH>T1HIGH)));
T2HIGH:=CONST(REF(HIGH,T2));
T3:=CONST(BARSLAST((CURRBARSCOUNT >(CC+T2)) AND (HIGH>T2HIGH)));
T3HIGH:=CONST(REF(HIGH,T3));
必杀线:DRAWLINE(CURRBARSCOUNT=T3+1, T3HIGH, ISLASTBAR, T3HIGH, 1),LINETHICK3,COLOR0000FF;
DRAWTEXT(ISLASTBAR, T3HIGH, ' 必杀线')LINETHICK1,COLORYELLOW;
筹码重心:IF(CURRBARSCOUNT<INTPART(PPART(4)*100/2),CONST(COSTEX(REF(C,3),REF(C,4)))*1.03,DRAWNULL),COLORF7F7F7;
DRAWTEXT(CURRBARSCOUNT<4 AND CROSS(C,筹码重心) AND C/REF(C,1)>1.05,L,'---突破筹码重心买进!'),COLORMAGENTA;
DRAWTEXT(筹码重心 AND ISLASTBAR,筹码重心*0.99,'↖筹码重心'),COLORF7F7F7;
P:=21;
WH1:=IF(L=LLV(L,P),L,DRAWNULL);
WH2:=CONST(BARSLAST(WH1!=DRAWNULL));
WH3:=CONST(IF(WH2=0,H,REF(H,WH2)));
WH4:=CONST(REF(BARSLAST(H>WH3),WH2+1)+WH2+1);
WH5:=CONST(IF(WH4=0,H,REF(H,WH4)));
WH6:=CONST(REF(BARSLAST(H>WH5),WH4+1)+WH4+1);
进场:IF(CURRBARSCOUNT<=WH2+21,CONST(IF(WH6=0,H,REF(H,WH6))),DRAWNULL),COLORRED;
IF(CURRBARSCOUNT<=WH2+1,IF(L=LLV(L,P),L,DRAWNULL),DRAWNULL),CIRCLEDOT,COLORRED;
DRAWTEXT(CURRBARSCOUNT=INTPART((WH2+21)*0.618),进场,'进场线'),COLORRED;
超跌进场:IF(CURRBARSCOUNT<=WH2+21,CONST(IF(WH4=0,H,REF(H,WH4))),DRAWNULL),COLORCB21BE;
DRAWTEXT(CURRBARSCOUNT=INTPART((WH2+21)*0.618),超跌进场,'超跌进场线'),COLORCB21BE;
H1:=IF(H=HHV(H,P),H,DRAWNULL);
H2:=CONST(BARSLAST(H1!=DRAWNULL));
H3:=CONST(IF(H2=0,L,REF(L,H2)));
H4:=CONST(REF(BARSLAST(L<H3),H2+1)+H2+1);
H5:=CONST(IF(H4=0,L,REF(L,H4)));
H6:=CONST(REF(BARSLAST(L<H5),H4+1)+H4+1);
止损:IF(CURRBARSCOUNT<=H2+21,CONST(IF(H6=0,L,REF(L,H6))),DRAWNULL),COLORYELLOW;
IF(CURRBARSCOUNT<=H2+1,IF(H=HHV(H,P),H,DRAWNULL),DRAWNULL),CIRCLEDOT,COLORBLUE;
DRAWTEXT(CURRBARSCOUNT=INTPART((H2+21)*0.618),止损,'止损线'),COLORYELLOW;
止盈:IF(CURRBARSCOUNT<=H2+21,CONST(IF(H4=0,L,REF(L,H4))),DRAWNULL),COLORCB21BE;
DRAWTEXT(CURRBARSCOUNT=INTPART((H2+21)*0.618),止盈,'止盈线'),COLORCB21BE;
未来函数检测结果如下:
该公式包含未来函数:COST
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
N赋值:10
T1赋值:CONST(LLVBARS(最低价,N))
T1最高价:=CONST(T1日前的最高价)
CC赋值:CONST(CURRBARSCOUNT)
T2赋值:CONST(上次(CURRBARSCOUNT >(CC+T1距今天数) AND (最高价>T1最高价)))
T2最高价:=CONST(T2日前的最高价)
T3赋值:CONST(上次(CURRBARSCOUNT >(CC+T2距今天数) AND (最高价>T2最高价)))
T3最高价:=CONST(T3日前的最高价)
输出
必杀线:DRAWLINE(CURRBARSCOUNT=T3+1, T3最高价, ISLASTBAR, T3最高价, 1),LINETHICK3,COLOR0000FF
当满足条件ISLASTBAR时,在 T3最高价和 ' 必杀线'位置书写文字
输出筹码重心:IF(CURRBARSCOUNT
DRAWTEXT(CURRBARSCOUNT<4 AND C上穿筹码重心 AND C/1日前的C>1.05,L,'---突破筹码重心买进!'),COLORMAGENTA
当满足条件筹码重心 AND ISLASTBAR时,在筹码重心*0.99和'↖筹码重心'位置书写文字
P赋值:21
WH1赋值:IF(L=P日内L最低值,L,DRAWNULL)
WH2赋值:CONST(上次WH1!=DRAWNULL距今天数)
WH3赋值:CONST(IF(WH2=0,H,WH2日前的H))
WH4赋值:CONST(REF(上次H>WH3距今天数,WH2+1)+WH2+1)
WH5赋值:CONST(IF(WH4=0,H,WH4日前的H))
WH6赋值:CONST(REF(上次H>WH5距今天数,WH4+1)+WH4+1)
输出
进场:IF(CURRBARSCOUNT<=WH2+21,CONST(IF(WH6=0,H,WH6日前的H)),DRAWNULL),画红色
IF(CURRBARSCOUNT<=WH2+1,IF(L=P日内L最低值,L,DRAWNULL),DRAWNULL),CIRCLEDOT,画红色
DRAWTEXT(CURRBARSCOUNT=INTPART((WH2+21)*0.618),进场,'进场线'),画红色
输出
超跌进场:IF(CURRBARSCOUNT<=WH2+21,CONST(IF(WH4=0,H,WH4日前的H)),DRAWNULL),COLORCB21BE
DRAWTEXT(CURRBARSCOUNT=INTPART((WH2+21)*0.618),超跌进场,'超跌进场线'),COLORCB21BE
H1赋值:IF(H=P日内H最高值,H,DRAWNULL)
H2赋值:CONST(上次H1!=DRAWNULL距今天数)
H3赋值:CONST(IF(H2=0,L,H2日前的L))
H4赋值:CONST(REF(上次L
H5赋值:CONST(IF(H4=0,L,H4日前的L))
H6赋值:CONST(REF(上次L输出
止损:IF(CURRBARSCOUNT<=H2+21,CONST(IF(H6=0,L,H6日前的L)),DRAWNULL),画黄色
IF(CURRBARSCOUNT<=H2+1,IF(H=P日内H最高值,H,DRAWNULL),DRAWNULL),CIRCLEDOT, 画蓝色
DRAWTEXT(CURRBARSCOUNT=INTPART((H2+21)*0.618),止损,'止损线'),画黄色
输出
止盈:IF(CURRBARSCOUNT<=H2+21,CONST(IF(H4=0,L,H4日前的L)),DRAWNULL),COLORCB21BE
DRAWTEXT(CURRBARSCOUNT=INTPART((H2+21)*0.618),止盈,'止盈线'),COLORCB21BE