北沙分时主图

[复制链接]
查看160 | 回复0 | 2022-7-24 07:35:16 | 显示全部楼层 |阅读模式

{第一小时}
 均价:SUM(V*C,0)/SUM(V,0),COLORGREEN;
 TJ:=TIME=93100;
 TS:=BARSLAST(TJ);
 TJ2:=TIME=103000;
 TS2:=BARSLAST(TJ2);
 低点信号1:=IF(BETWEEN(TIME,93100,103000),LLV(L,TS),DRAWNULL)=C;
 DT1:=CONST(IF(BARSLAST(FILTERX(低点信号1,TS))>=0,REF(IF(FILTERX(低点信号1,TS),TIME,0),BARSLAST(FILTERX(低点信号1,TS))),
 DRAWNULL));
 D:=CONST(REF(C,BARSLAST(IF(FILTERX(低点信号1,TS),1,0))));
 高点信号1:=IF(BETWEEN(TIME,93100,103000),HHV(C,TS),DRAWNULL)=C;
 GT1:=CONST(IF(BARSLAST(FILTERX(高点信号1,TS))>=0,REF(IF(FILTERX(高点信号1,TS),TIME,0),BARSLAST(FILTERX(高点信号1,TS))),
 DRAWNULL));
 G:=CONST(REF(C,BARSLAST(IF(FILTERX(高点信号1,TS),1,0))));
 D1横线:=IF(DYNAINFO(4)<=D,DYNAINFO(4),D);
 G1横线:=IF(DYNAINFO(4)>=G,DYNAINFO(4),G);
 D1:IF(TS<=59 AND DYNAINFO(4)>0,D1横线,DRAWNULL),COLORYELLOW;
 G1:IF(TS<=59 AND DYNAINFO(4)>0,G1横线,DRAWNULL),COLORYELLOW;
 STICKLINE(TJ,G1,D1,0,0),COLORYELLOW;
 STICKLINE(TIME=103000,G1,D1,0,0),COLORYELLOW;
 STICKLINE(BETWEEN(TIME,93100,103000) AND ISLASTBAR,G1,D1,0,0),COLORYELLOW;
 天数横线1:=CONST(60);
 收盘1大:=CONST(IF(BARSLAST(TIME=103000)>=0 AND REF(C,BARSLAST(TIME=103000))>=DYNAINFO(4),REF(C,BARSLAST(TIME=103000)),0));
 收盘1小:=CONST(IF(BARSLAST(TIME=103000)>=0 AND REF(C,BARSLAST(TIME=103000))<DYNAINFO(4),REF(C,BARSLAST(TIME=103000)),0));
 IF(收盘1大 AND TIME<=103100,D1+((G1-D1)/天数横线1)*TS,DRAWNULL),COLORRED;
 IF(收盘1小 AND TIME<=103100,G1-((G1-D1)/天数横线1)*TS,DRAWNULL),COLORGREEN;
 {实时1}
 天数横线1实时:=CONST(IF(ISLASTBAR,TS,DRAWNULL));
 收盘1实时:=CONST(IF(TS>=0 AND TS<=60,C,DRAWNULL));
 开盘1实时:=DYNAINFO(4);
 IF(收盘1实时>=开盘1实时 AND TIME<=103100,D1+((G1-D1)/天数横线1实时)*TS,DRAWNULL),COLORRED;
 IF(收盘1实时<开盘1实时 AND TIME<=103100,G1-((G1-D1)/天数横线1实时)*TS,DRAWNULL),COLORGREEN;
 {第二小时}
 TJ3:=TIME=130000;
 TS3:=BARSLAST(TJ3);
 低点信号2:=IF(BETWEEN(TIME,103000,113000),LLV(L,TS2),DRAWNULL)=C;
 DT2:=CONST(IF(BARSLAST(FILTERX(低点信号2,TS2))>=0,REF(IF(FILTERX(低点信号2,TS2),TIME,0),BARSLAST(FILTERX(低点信号2,TS2))),
 DRAWNULL));
 DD2:=CONST(REF(C,BARSLAST(IF(FILTERX(低点信号2,TS2),1,0))));
 高点信号2:=IF(BETWEEN(TIME,103000,113000),HHV(C,TS2),DRAWNULL)=C;
 GT2:=CONST(IF(BARSLAST(FILTERX(高点信号2,TS2))>=0,REF(IF(FILTERX(高点信号2,TS2),TIME,0),BARSLAST(FILTERX(高点信号2,TS2))),
 DRAWNULL));
 GG2:=CONST(REF(C,BARSLAST(IF(FILTERX(高点信号2,TS2),1,0))));
 D2:IF(TS<=119 AND TS2>=0,DD2,DRAWNULL),COLORYELLOW;
 G2:IF(TS<=119 AND TS2>=0,GG2,DRAWNULL),COLORYELLOW;
 STICKLINE(TJ2,GG2,DD2,0,0),COLORYELLOW;
 STICKLINE(TIME=130000,GG2,DD2,0,0),COLORYELLOW;
 STICKLINE(BETWEEN(TIME,103000,113000) AND ISLASTBAR,G2,D2,0,0),COLORYELLOW;
 收1:=CONST(IF(BARSLAST(TIME=112900)>=0,REF(C,TS2),0));
 午收:=CONST(IF(BARSLAST(TIME=112900)>=0,REF(C,BARSLAST(TIME=112900)),0));
 IF(午收>=收1 AND TIME<=113000,D2+((G2-D2)/天数横线1)*TS2,DRAWNULL),COLORRED;
 IF(午收<收1 AND TIME<=113000,G2-((G2-D2)/天数横线1)*TS2,DRAWNULL),COLORGREEN;
 {实时2}
 天数横线2实时:=CONST(IF(ISLASTBAR,TS2,DRAWNULL));
 收盘2实时:=CONST(IF(TS2>=0 AND TS2<=60,C,DRAWNULL));
 开盘2实时:=CONST(IF(TS2>=0,REF(C,TS2),0));
 IF(收盘2实时>=开盘2实时 AND TIME<=113000,D2+((G2-D2)/天数横线2实时)*TS2,DRAWNULL),COLORRED;
 IF(收盘2实时<开盘2实时 AND TIME<=113000,G2-((G2-D2)/天数横线2实时)*TS2,DRAWNULL),COLORGREEN;
 {第三小时}
 低点信号3:=IF(BETWEEN(TIME,113000,140000),LLV(L,TS3),DRAWNULL)=C;
 DT3:=CONST(IF(BARSLAST(FILTERX(低点信号3,TS3))>=0,REF(IF(FILTERX(低点信号3,TS3),TIME,0),BARSLAST(FILTERX(低点信号3,TS3))),
 DRAWNULL));
 DD3:=CONST(REF(C,BARSLAST(IF(FILTERX(低点信号3,TS3),1,0))));
 高点信号3:=IF(BETWEEN(TIME,113000,140000),HHV(C,TS3),DRAWNULL)=C;
 GT3:=CONST(IF(BARSLAST(FILTERX(高点信号3,TS3))>=0,REF(IF(FILTERX(高点信号3,TS3),TIME,0),BARSLAST(FILTERX(高点信号3,TS3))),
 DRAWNULL));
 GG3:=CONST(REF(C,BARSLAST(IF(FILTERX(高点信号3,TS3),1,0))));
 D3:IF(TS<=179 AND TS3>=0,DD3,DRAWNULL),COLORYELLOW;
 G3:IF(TS<=179 AND TS3>=0,GG3,DRAWNULL),COLORYELLOW;
 STICKLINE(TJ3,GG3,DD3,0,0),COLORYELLOW;
 STICKLINE(TIME=140000,GG3,DD3,0,0),COLORYELLOW;
 STICKLINE(BETWEEN(TIME,130000,140000) AND ISLASTBAR,G3,D3,0,0),COLORYELLOW;
 收2:=CONST(IF(BARSLAST(TIME=130000)>=0,REF(C,TS3),0));
 收3:=CONST(IF(BARSLAST(TIME=135900)>=0,REF(C,BARSLAST(TIME=135900)),0));
 IF(收3>=收2 AND TIME<=135900,D3+((G3-D3)/天数横线1)*TS3,DRAWNULL),COLORRED;
 IF(收3<收2 AND TIME<=135900,G3-((G3-D3)/天数横线1)*TS3,DRAWNULL),COLORGREEN;
 {实时3}
 天数横线3实时:=CONST(IF(ISLASTBAR,TS3,DRAWNULL));
 收盘3实时:=CONST(IF(TS3>=0 AND TS3<=60,C,DRAWNULL));
 开盘3实时:=CONST(IF(TS3>=0,REF(C,TS3),0));
 IF(收盘3实时>=开盘3实时 AND TIME<=140000,D3+((G3-D3)/天数横线3实时)*TS3,DRAWNULL),COLORRED;
 IF(收盘3实时<开盘3实时 AND TIME<=140000,G3-((G3-D3)/天数横线3实时)*TS3,DRAWNULL),COLORGREEN;
 {第四小时}
 TJ4:=TIME=140000;
 TS4:=BARSLAST(TJ4);
 低点信号4:=IF(TS4>=0,LLV(L,TS4),DRAWNULL)=C;
 DT4:=CONST(IF(BARSLAST(FILTERX(低点信号4,TS4))>=0,REF(IF(FILTERX(低点信号4,TS4),TIME,0),BARSLAST(FILTERX(低点信号4,TS4))),
 DRAWNULL));
 DD4:=CONST(REF(C,BARSLAST(IF(FILTERX(低点信号4,TS4),1,0))));
 高点信号4:=IF(TS4>=0,HHV(C,TS4),DRAWNULL)=C;
 GG4:=CONST(REF(C,BARSLAST(IF(FILTERX(高点信号4,TS4),1,0))));
 GT4:=CONST(IF(BARSLAST(FILTERX(高点信号4,TS4))>=0,REF(IF(FILTERX(高点信号4,TS4),TIME,0),BARSLAST(FILTERX(高点信号4,TS4))),
 DRAWNULL));
 D4:IF(TS4>=0,DD4,DRAWNULL),COLORYELLOW;
 G4:IF(TS4>=0,GG4,DRAWNULL),COLORYELLOW;
 STICKLINE(TJ4,GG4,DD4,0,0),COLORYELLOW;
 STICKLINE(TS4>=0 AND ISLASTBAR,GG4,DD4,0,0),COLORYELLOW;
 收4:=CONST(IF(BARSLAST(TIME=140000)>=0,REF(C,TS4),0));
 收5:=DYNAINFO(7);
 天数横线4:=CONST(TS4);
 IF(收5>=收4 AND TIME<=145900,D4+((G4-D4)/天数横线4)*TS4,DRAWNULL),COLORRED;
 IF(收5<收4 AND TIME<=145900,G4-((G4-D4)/天数横线4)*TS4,DRAWNULL),COLORGREEN;
 DRAWTEXT(TIME=93100 AND GT1>DT1,G1*0.998,'【涨幅】:           ﹪'),COLORMAGENTA;
 DRAWNUMBER(GT1>DT1 AND TIME=94500,G1*0.998,(D1-G1)/G1*100),COLORMAGENTA;
 DRAWTEXT(TIME=93100 AND GT1<DT1,D1*1.001,'【跌幅】:           ﹪'),COLORGREEN;
 DRAWNUMBER(GT1<DT1 AND TIME=94500,D1*1.001,(D1-G1)/G1*100),COLORGREEN;
 
DRAWTEXT(TIME=103100 AND GT2>DT2,G2*0.998,'【涨幅】:           ﹪'),COLORMAGENTA;
 DRAWNUMBER(GT2>DT2 AND TIME=104500,G2*0.998,(D2-G2)/G2*100),COLORMAGENTA;
 DRAWTEXT(TIME=103100 AND GT2<DT2,D2*1.001,'【跌幅】:           ﹪'),COLORGREEN;
 DRAWNUMBER(GT2<DT2 AND TIME=104500,D2*1.001,(D2-G2)/G2*100),COLORGREEN;
 
DRAWTEXT(TIME=130100 AND GT3>DT3,G3*0.998,'【涨幅】:           ﹪'),COLORMAGENTA;
 DRAWNUMBER(GT3>DT3 AND TIME=131500,G3*0.998,(D3-G3)/G3*100),COLORMAGENTA;
 DRAWTEXT(TIME=130100 AND GT3<DT3,D3*1.001,'【跌幅】:           ﹪'),COLORGREEN;
 DRAWNUMBER(GT3<DT3 AND TIME=131500,D3*1.001,(D3-G3)/G3*100),COLORGREEN;
 
DRAWTEXT(TIME=140100 AND GT4>DT4,G4*0.998,'【涨幅】:           ﹪'),COLORMAGENTA;
 DRAWNUMBER(GT4>DT4 AND TIME=141500,G4*0.998,(D4-G4)/G4*100),COLORMAGENTA;
 DRAWTEXT(TIME=140100 AND GT4<DT4,D4*1.001,'【跌幅】:           ﹪'),COLORGREEN;
 DRAWNUMBER(GT4<DT4 AND TIME=141500,D4*1.001,(D4-G4)/G4*100),COLORGREEN;

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则