出击逃遁通达信公式 主图 源码附图
A0:=(L+H+C*2)/4;
A1:EMA(A0,14)COLORBLUE,LINETHICK2;
A2:=EMA(A0,25)COLORLIBLUE,LINETHICK2;
A1X:=(A1-REF(A1,1))/REF(A1,1)*100,NODRAW;
A2X:=(A2-REF(A2,1))/REF(A2,1)*100,NODRAW;
出击:IF(A1X>=0 AND BARSLAST(CROSS(A1X,0))>0,REF((C+O)/2,BARSLAST(CROSS(A1X,0))),DRAWNULL),COLORMAGENTA,LINETHICK2;
逃遁:IF(A1X<0 AND BARSLAST(CROSS(0,A1X))>0,REF((C+O)/2,BARSLAST(CROSS(0,A1X))),DRAWNULL),COLORGREEN,LINETHICK2;
盈10%:IF(A1X>=0 AND H>=REF(A0,BARSLAST(CROSS(A1X,0)))*1.1,REF((C+O)/2,BARSLAST(CROSS(A1X,0)))*1.1,DRAWNULL),COLORWHITE,POINTDOT;
盈20%:IF(A1X>=0 AND H>=REF(A0,BARSLAST(CROSS(A1X,0)))*1.2,REF((C+O)/2,BARSLAST(CROSS(A1X,0)))*1.2,DRAWNULL),COLORWHITE,POINTDOT;
盈30%:IF(A1X>=0 AND H>=REF(A0,BARSLAST(CROSS(A1X,0)))*1.3,REF((C+O)/2,BARSLAST(CROSS(A1X,0)))*1.3,DRAWNULL),COLORWHITE,POINTDOT;
盈40%:IF(A1X>=0 AND H>=REF(A0,BARSLAST(CROSS(A1X,0)))*1.4,REF((C+O)/2,BARSLAST(CROSS(A1X,0)))*1.4,DRAWNULL),COLORWHITE,POINTDOT;
盈50%:IF(A1X>=0 AND H>=REF(A0,BARSLAST(CROSS(A1X,0)))*1.5,REF((C+O)/2,BARSLAST(CROSS(A1X,0)))*1.5,DRAWNULL),COLORWHITE,POINTDOT;
铁:IF(A1X>=0,A1,DRAWNULL)COLORRED,LINETHICK2;
律:IF(A1X<0 AND A2X<0,A1,DRAWNULL)COLORGREEN,LINETHICK2;
STICKLINE(CROSS(A1X,0),H,L,0,0 ),COLOR9933FF;
STICKLINE(CROSS(A1X,0),C,O,3,0 ),COLOR0000CC;
STICKLINE(CROSS(A1X,0),C,O,1,0 ),COLOR0033FF;
STICKLINE(CROSS(0,A1X),L,H,0,0 ),COLOR66CC33;
STICKLINE(CROSS(0,A1X),C,O,3,0),COLOR00CC00;
STICKLINE(CROSS(0,A1X),C,O,1,0),COLOR66FF00;
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
A0赋值:(L+H+C*2)/4
输出
A1:A0的14日指数移动平均 画蓝色, 线宽为2
A2赋值:A0的25日指数移动平均COLORLIBLUE, 线宽为2
A1X:=(A1-1日前的A1)/1日前的A1*100,NODRAW
A2X:=(A2-1日前的A2)/1日前的A2*100,NODRAW
输出
出击:IF(A1X>=0 AND 上次A1X上穿0距今天数>0,REF((C+O)/2,上次A1X上穿0距今天数),DRAWNULL),画洋红色, 线宽为2
输出
逃遁:IF(A1X<0 AND 上次0上穿A1X距今天数>0,REF((C+O)/2,上次0上穿A1X距今天数),DRAWNULL),画绿色, 线宽为2
输出
盈10%:IF(A1X>=0 AND H>=REF(A0,上次A1X上穿0距今天数)*1.1,REF((C+O)/2,上次A1X上穿0距今天数)*1.1,DRAWNULL),画白色,POINTDOT
输出
盈20%:IF(A1X>=0 AND H>=REF(A0,上次A1X上穿0距今天数)*1.2,REF((C+O)/2,上次A1X上穿0距今天数)*1.2,DRAWNULL),画白色,POINTDOT
输出
盈30%:IF(A1X>=0 AND H>=REF(A0,上次A1X上穿0距今天数)*1.3,REF((C+O)/2,上次A1X上穿0距今天数)*1.3,DRAWNULL),画白色,POINTDOT
输出
盈40%:IF(A1X>=0 AND H>=REF(A0,上次A1X上穿0距今天数)*1.4,REF((C+O)/2,上次A1X上穿0距今天数)*1.4,DRAWNULL),画白色,POINTDOT
输出
盈50%:IF(A1X>=0 AND H>=REF(A0,上次A1X上穿0距今天数)*1.5,REF((C+O)/2,上次A1X上穿0距今天数)*1.5,DRAWNULL),画白色,POINTDOT
如果A1X>=0返回A1否则返回DRAWNULL
如果A1X<0 AND A2X<0返回A1否则返回DRAWNULL
STICKLINE(A1X上穿0,H,L,0,0 ),COLOR9933FF
STICKLINE(A1X上穿0,C,O,3,0 ),COLOR0000CC
STICKLINE(A1X上穿0,C,O,1,0 ),COLOR0033FF
STICKLINE(0上穿A1X,L,H,0,0 ),COLOR66CC33
STICKLINE(0上穿A1X,C,O,3,0),COLOR00CC00
STICKLINE(0上穿A1X,C,O,1,0),COLOR66FF00