通达信智勇出击副图指标 资金博弈空袭反攻 有未来 源码附图
F:=100*(C-REF(C,1))/REF(C,1);
今小昨:=IF(C<REF(O,1) AND F<0,1,0);
S1:=今小昨;
今小前:=IF(C<REF(O,2) AND F<0,1,0),LINETHICK0;
S2:=今小前;
A1:=S1=0 AND REF(S1,1)=1 AND S2=0 AND REF(S2,1)=1 AND CROSS(ZIG(3,3) ,REF(ZIG(3 ,3),1));
A2:=S1=0 AND REF(S1,1)=1 AND S2=0 AND REF(S2,1)=1 AND CROSS(ZIG(3,5) ,REF(ZIG(3 ,5),1));
A3:=S1=0 AND REF(S1,1)=1 AND S2=0 AND REF(S2,1)=1 AND CROSS(ZIG(3,10) ,REF(ZIG(3 ,10),1));
STICKLINE(A1 AND A2 ,0,3,3,0)COLORGREEN;
STICKLINE(A1 AND A2 ,0,1,3,0)COLORBLUE;
STICKLINE(A1 AND A2 AND A3,0,5,3,0)COLORYELLOW;
STICKLINE(A1 AND A2 AND A3,0,3,3,0)COLORFF00FF;
STICKLINE(A1 AND A2 AND A3,0,1,3,0)COLORBLUE;
DRAWTEXT(A3=1,4.6,'长攻!'),COLORYELLOW;
智勇出击: ZIG(3,6)>REF(ZIG(3,6),1)AND REF(ZIG(3,6),1)<REF(ZIG
(3,6),2),COLORWHITE,LINETHICK2;
DRAWTEXT(智勇出击=1,0.8,'突袭!'),COLORWHITE;
小获且退: ZIG(3,10)<REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)>REF(ZIG
(3,10),2),COLORYELLOW,LINETHICK2;
DRAWTEXT(小获且退=1,1.3,'退!'),COLORYELLOW;
VAR3:=PEAKBARS(2,15,1)<10;
VAR5:=IF(VAR3=1,2,0);
顶:= IF(VAR5=2,2,0);
大胜且归:IF(顶>REF(顶,1),2,0),COLORRED,LINETHICK2;
DRAWTEXT(大胜且归=2,2,'撤!'),COLORRED;
DRAWRECTREL(0,10,175,999.4,IF(120,RGB(10,0,0),0));
超B:=L2_AMO(0,2)/10000.0;
大B:=L2_AMO(1,2)/10000.0;
中B:=L2_AMO(2,2)/10000.0;
小B:=L2_AMO(3,2)/10000.0;
超S:=L2_AMO(0,3)/10000.0;
大S:=L2_AMO(1,3)/10000.0;
中S:=L2_AMO(2,3)/10000.0;
小S:=L2_AMO(3,3)/10000.0;
净流入:=(超B+大B+中B+小B)-(超S+大S+中S+小S),NODRAW;
超大单:=(超B)-(超S),NODRAW;
大单:=(大B)-(大S),NODRAW;
中单:=(中B)-(中S),NODRAW;
小单:=(小B)-(小S),NODRAW;
DAZHI:=CONST(MAX(ABS(净流入),MAX(ABS(超大单),MAX(ABS(大单),MAX(ABS(中单),ABS(小单)))))),NODRAW;
DRAWRECTREL(0,CONST(830-(ABS(超大单)*500/DAZHI)),30,935,IF(CONST(超大单)>0,RGB(255,0,0),RGB(23,125,255)));
DRAWRECTREL(35,CONST(830-(ABS(大单)*500/DAZHI)),65,935,IF(CONST(大单)>0,RGB(255,0,0),RGB(23,125,255)));
DRAWRECTREL(70,CONST(830-(ABS(中单)*500/DAZHI)),100,935,IF(CONST(中单)>0,RGB(255,0,0),RGB(23,125,255)));
DRAWRECTREL(105,CONST(830-(ABS(小单)*500/DAZHI)),135,935,IF(CONST(小单)>0,RGB(255,0,0),RGB(23,125,255)));
DRAWRECTREL(140,CONST(830-(ABS(净流入)*500/DAZHI)),170,935,IF(CONST(净流入)>0,RGB(255,0,0{255,255,255}),RGB(23,125,255)));
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.002,0.0,0,'资金搏弈 (万元)'),COLORYELLOW;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.0025,0.18.55,0,INTPART(超大单)),COLORYELLOW;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.035,0.38.555,0,INTPART(大单)),COLORYELLOW;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.070,0.18.550,0,INTPART(中单)),COLORYELLOW;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.106,0.38.55,0,INTPART(小单)),COLORYELLOW;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.137,0.18.55,0,INTPART(净流入)),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.00,1,0,'超大'),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.035,1,0,'大单'),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.070,1,0,'中单'),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.104,1,0,'小单'),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.139,1,0,'净流'),COLORYELLOW;
未来函数检测结果如下:
该公式包含未来函数:ZIG
该公式包含未来函数:PEAK
该公式包含未来函数:PEAKBARS
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
F赋值:100*(C-1日前的C)/1日前的C
今小昨赋值:IF(C<1日前的O AND F<0,1,0)
S1赋值:今小昨
今小前赋值:IF(C<2日前的O AND F<0,1,0),LINETHICK0
S2赋值:今小前
A1赋值:S1=0 AND 1日前的S1=1 AND S2=0 AND 1日前的S2=1 AND CROSS(ZIG(3,3) ,REF(ZIG(3 ,3),1))
A2赋值:S1=0 AND 1日前的S1=1 AND S2=0 AND 1日前的S2=1 AND CROSS(ZIG(3,5) ,REF(ZIG(3 ,5),1))
A3赋值:S1=0 AND 1日前的S1=1 AND S2=0 AND 1日前的S2=1 AND CROSS(ZIG(3,10) ,REF(ZIG(3 ,10),1))
当满足条件A1 AND A2 时,在0和3之间画柱状线
当满足条件A1 AND A2 时,在0和1之间画柱状线
当满足条件A1 AND A2 AND A3时,在0和5之间画柱状线
当满足条件A1 AND A2 AND A3时,在0和3之间画柱状线
当满足条件A1 AND A2 AND A3时,在0和1之间画柱状线
当满足条件A3=1时,在4.6和'长攻!'位置书写文字
输出智勇出击: ZIG(3,6)>REF(ZIG(3,6),1)AND REF(ZIG(3,6),1)[当满足条件智勇出击=1时,在0.8和'突袭!'位置书写文字]
输出小获且退: ZIG(3,10)[REF(ZIG
(3,10),2),画黄色, 线宽为2]
当满足条件小获且退=1时,在1.3和'退!'位置书写文字
VAR3赋值:PEAKBARS(2,15,1)<10
如果VAR3=1返回2否则返回0
如果VAR5=2返回2否则返回0
输出大胜且归:IF(顶>1日前的顶,2,0),画红色, 线宽为2
当满足条件大胜且归=2时,在2和'撤!'位置书写文字
DRAWRECTREL(0,10,175,999.4,IF(120,RGB(10,0,0),0))
超B赋值:L2_AMO(0,2)/10000.0
大B赋值:L2_AMO(1,2)/10000.0
中B赋值:L2_AMO(2,2)/10000.0
小B赋值:L2_AMO(3,2)/10000.0
超S赋值:L2_AMO(0,3)/10000.0
大S赋值:L2_AMO(1,3)/10000.0
中S赋值:L2_AMO(2,3)/10000.0
小S赋值:L2_AMO(3,3)/10000.0
净流入赋值:(超B+大B+中B+小B)-(超S+大S+中S+小S),NODRAW
超大单赋值:(超B)-(超S),NODRAW
大单赋值:(大B)-(大S),NODRAW
中单赋值:(中B)-(中S),NODRAW
小单赋值:(小B)-(小S),NODRAW
DAZHI赋值:CONST(MAX(净流入的绝对值,MAX(ABS(超大单),MAX(ABS(大单),MAX(ABS(中单),ABS(小单)))))),NODRAW
DRAWRECTREL(0,CONST(830-(超大单的绝对值*500/DAZHI)),30,935,IF(CONST(超大单)>0,RGB(255,0,0),RGB(23,125,255)))
DRAWRECTREL(35,CONST(830-(大单的绝对值*500/DAZHI)),65,935,IF(CONST(大单)>0,RGB(255,0,0),RGB(23,125,255)))
DRAWRECTREL(70,CONST(830-(中单的绝对值*500/DAZHI)),100,935,IF(CONST(中单)>0,RGB(255,0,0),RGB(23,125,255)))
DRAWRECTREL(105,CONST(830-(小单的绝对值*500/DAZHI)),135,935,IF(CONST(小单)>0,RGB(255,0,0),RGB(23,125,255)))
DRAWRECTREL(140,CONST(830-(净流入的绝对值*500/DAZHI)),170,935,IF(CONST(净流入)>0,RGB(255,0,0{255,255,255}),RGB(23,125,255)))
DRAWTEXT_FIX( 到最后交易的周期=1,0.002,0.0,0,'资金搏弈 (万元)'),画黄色
DRAWNUMBER_FIX( 到最后交易的周期=1,0.0025,0.18.55,0,INTPART(超大单)),画黄色
DRAWNUMBER_FIX( 到最后交易的周期=1,0.035,0.38.555,0,INTPART(大单)),画黄色
DRAWNUMBER_FIX( 到最后交易的周期=1,0.070,0.18.550,0,INTPART(中单)),画黄色
DRAWNUMBER_FIX( 到最后交易的周期=1,0.106,0.38.55,0,INTPART(小单)),画黄色
DRAWNUMBER_FIX( 到最后交易的周期=1,0.137,0.18.55,0,INTPART(净流入)),画黄色
当满足条件 到最后交易的周期=1时,在横轴0.00纵轴1位置书写文字
当满足条件 到最后交易的周期=1时,在横轴0.035纵轴1位置书写文字
当满足条件 到最后交易的周期=1时,在横轴0.070纵轴1位置书写文字
当满足条件 到最后交易的周期=1时,在横轴0.104纵轴1位置书写文字
当满足条件 到最后交易的周期=1时,在横轴0.139纵轴1位置书写文字