{第一小時(shí)}
均價(jià):SUM(V*C,0)/SUM(V,0),COLORYELLOW;
TJ:=TIME=93100;
TS:=BARSLAST(TJ);
TJ2:=TIME=103000;
TS2:=BARSLAST(TJ2);
低點(diǎn)信號(hào)1:=IF(BETWEEN(TIME,93100,103000),LLV(L,TS),DRAWNULL)=C;
DT1:=CONST(IF(BARSLAST(FILTERX(低點(diǎn)信號(hào)1,TS))>=0,REF(IF(FILTERX(低點(diǎn)信號(hào)1,TS),TIME,0),BARSLAST(FILTERX(低點(diǎn)信號(hào)1,TS))),
DRAWNULL));
D:=CONST(REF(C,BARSLAST(IF(FILTERX(低點(diǎn)信號(hào)1,TS),1,0))));
高點(diǎn)信號(hào)1:=IF(BETWEEN(TIME,93100,103000),HHV(C,TS),DRAWNULL)=C;
GT1:=CONST(IF(BARSLAST(FILTERX(高點(diǎn)信號(hào)1,TS))>=0,REF(IF(FILTERX(高點(diǎn)信號(hào)1,TS),TIME,0),BARSLAST(FILTERX(高點(diǎn)信號(hào)1,TS))),
DRAWNULL));
G:=CONST(REF(C,BARSLAST(IF(FILTERX(高點(diǎn)信號(hào)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),COLORLICYAN;
G1:IF(TS<=59 AND DYNAINFO(4)>0,G1橫線,DRAWNULL),COLORLICYAN;
STICKLINE(TJ,G1,D1,0,0),COLORLICYAN;
STICKLINE(TIME=103000,G1,D1,0,0),COLORLICYAN;
STICKLINE(BETWEEN(TIME,93100,103000) AND ISLASTBAR,G1,D1,0,0),COLORLICYAN;
天數(shù)橫線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)/天數(shù)橫線1)*TS,DRAWNULL),COLORRED;
IF(收盤1小 AND TIME<=103100,G1-((G1-D1)/天數(shù)橫線1)*TS,DRAWNULL),COLORGREEN;
{實(shí)時(shí)1}
天數(shù)橫線1實(shí)時(shí):=CONST(IF(ISLASTBAR,TS,DRAWNULL));
收盤1實(shí)時(shí):=CONST(IF(TS>=0 AND TS<=60,C,DRAWNULL));
開盤1實(shí)時(shí):=DYNAINFO(4);
IF(收盤1實(shí)時(shí)>=開盤1實(shí)時(shí) AND TIME<=103100,D1+((G1-D1)/天數(shù)橫線1實(shí)時(shí))*TS,DRAWNULL),COLORRED;
IF(收盤1實(shí)時(shí)<開盤1實(shí)時(shí) AND TIME<=103100,G1-((G1-D1)/天數(shù)橫線1實(shí)時(shí))*TS,DRAWNULL),COLORGREEN;
{第二小時(shí)}
TJ3:=TIME=130000;
TS3:=BARSLAST(TJ3);
低點(diǎn)信號(hào)2:=IF(BETWEEN(TIME,103000,113000),LLV(L,TS2),DRAWNULL)=C;
DT2:=CONST(IF(BARSLAST(FILTERX(低點(diǎn)信號(hào)2,TS2))>=0,REF(IF(FILTERX(低點(diǎn)信號(hào)2,TS2),TIME,0),BARSLAST(FILTERX(低點(diǎn)信號(hào)2,TS2))),
DRAWNULL));
DD2:=CONST(REF(C,BARSLAST(IF(FILTERX(低點(diǎn)信號(hào)2,TS2),1,0))));
高點(diǎn)信號(hào)2:=IF(BETWEEN(TIME,103000,113000),HHV(C,TS2),DRAWNULL)=C;
GT2:=CONST(IF(BARSLAST(FILTERX(高點(diǎn)信號(hào)2,TS2))>=0,REF(IF(FILTERX(高點(diǎn)信號(hào)2,TS2),TIME,0),BARSLAST(FILTERX(高點(diǎn)信號(hào)2,TS2))),
DRAWNULL));
GG2:=CONST(REF(C,BARSLAST(IF(FILTERX(高點(diǎn)信號(hào)2,TS2),1,0))));
D2:IF(TS<=119 AND TS2>=0,DD2,DRAWNULL),COLORLICYAN;
G2:IF(TS<=119 AND TS2>=0,GG2,DRAWNULL),COLORLICYAN;
STICKLINE(TJ2,GG2,DD2,0,0),COLORLICYAN;
STICKLINE(TIME=130000,GG2,DD2,0,0),COLORLICYAN;
STICKLINE(BETWEEN(TIME,103000,113000) AND ISLASTBAR,G2,D2,0,0),COLORLICYAN;
收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)/天數(shù)橫線1)*TS2,DRAWNULL),COLORRED;
IF(午收<收1 AND TIME<=113000,G2-((G2-D2)/天數(shù)橫線1)*TS2,DRAWNULL),COLORGREEN;
{實(shí)時(shí)2}
天數(shù)橫線2實(shí)時(shí):=CONST(IF(ISLASTBAR,TS2,DRAWNULL));
收盤2實(shí)時(shí):=CONST(IF(TS2>=0 AND TS2<=60,C,DRAWNULL));
開盤2實(shí)時(shí):=CONST(IF(TS2>=0,REF(C,TS2),0));
IF(收盤2實(shí)時(shí)>=開盤2實(shí)時(shí) AND TIME<=113000,D2+((G2-D2)/天數(shù)橫線2實(shí)時(shí))*TS2,DRAWNULL),COLORRED;
IF(收盤2實(shí)時(shí)<開盤2實(shí)時(shí) AND TIME<=113000,G2-((G2-D2)/天數(shù)橫線2實(shí)時(shí))*TS2,DRAWNULL),COLORGREEN;
{第三小時(shí)}
低點(diǎn)信號(hào)3:=IF(BETWEEN(TIME,113000,140000),LLV(L,TS3),DRAWNULL)=C;
DT3:=CONST(IF(BARSLAST(FILTERX(低點(diǎn)信號(hào)3,TS3))>=0,REF(IF(FILTERX(低點(diǎn)信號(hào)3,TS3),TIME,0),BARSLAST(FILTERX(低點(diǎn)信號(hào)3,TS3))),
DRAWNULL));
DD3:=CONST(REF(C,BARSLAST(IF(FILTERX(低點(diǎn)信號(hào)3,TS3),1,0))));
高點(diǎn)信號(hào)3:=IF(BETWEEN(TIME,113000,140000),HHV(C,TS3),DRAWNULL)=C;
GT3:=CONST(IF(BARSLAST(FILTERX(高點(diǎn)信號(hào)3,TS3))>=0,REF(IF(FILTERX(高點(diǎn)信號(hào)3,TS3),TIME,0),BARSLAST(FILTERX(高點(diǎn)信號(hào)3,TS3))),
DRAWNULL));
GG3:=CONST(REF(C,BARSLAST(IF(FILTERX(高點(diǎn)信號(hào)3,TS3),1,0))));
D3:IF(TS<=179 AND TS3>=0,DD3,DRAWNULL),COLORLICYAN;
G3:IF(TS<=179 AND TS3>=0,GG3,DRAWNULL),COLORLICYAN;
STICKLINE(TJ3,GG3,DD3,0,0),COLORLICYAN;
STICKLINE(TIME=140000,GG3,DD3,0,0),COLORLICYAN;
STICKLINE(BETWEEN(TIME,130000,140000) AND ISLASTBAR,G3,D3,0,0),COLORLICYAN;
收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)/天數(shù)橫線1)*TS3,DRAWNULL),COLORRED;
IF(收3<收2 AND TIME<=135900,G3-((G3-D3)/天數(shù)橫線1)*TS3,DRAWNULL),COLORGREEN;
{實(shí)時(shí)3}
天數(shù)橫線3實(shí)時(shí):=CONST(IF(ISLASTBAR,TS3,DRAWNULL));
收盤3實(shí)時(shí):=CONST(IF(TS3>=0 AND TS3<=60,C,DRAWNULL));
開盤3實(shí)時(shí):=CONST(IF(TS3>=0,REF(C,TS3),0));
IF(收盤3實(shí)時(shí)>=開盤3實(shí)時(shí) AND TIME<=140000,D3+((G3-D3)/天數(shù)橫線3實(shí)時(shí))*TS3,DRAWNULL),COLORRED;
IF(收盤3實(shí)時(shí)<開盤3實(shí)時(shí) AND TIME<=140000,G3-((G3-D3)/天數(shù)橫線3實(shí)時(shí))*TS3,DRAWNULL),COLORGREEN;
{第四小時(shí)}
TJ4:=TIME=140000;
TS4:=BARSLAST(TJ4);
低點(diǎn)信號(hào)4:=IF(TS4>=0,LLV(L,TS4),DRAWNULL)=C;
DT4:=CONST(IF(BARSLAST(FILTERX(低點(diǎn)信號(hào)4,TS4))>=0,REF(IF(FILTERX(低點(diǎn)信號(hào)4,TS4),TIME,0),BARSLAST(FILTERX(低點(diǎn)信號(hào)4,TS4))),
DRAWNULL));
DD4:=CONST(REF(C,BARSLAST(IF(FILTERX(低點(diǎn)信號(hào)4,TS4),1,0))));
高點(diǎn)信號(hào)4:=IF(TS4>=0,HHV(C,TS4),DRAWNULL)=C;
GG4:=CONST(REF(C,BARSLAST(IF(FILTERX(高點(diǎn)信號(hào)4,TS4),1,0))));
GT4:=CONST(IF(BARSLAST(FILTERX(高點(diǎn)信號(hào)4,TS4))>=0,REF(IF(FILTERX(高點(diǎn)信號(hào)4,TS4),TIME,0),BARSLAST(FILTERX(高點(diǎn)信號(hào)4,TS4))),
DRAWNULL));
D4:IF(TS4>=0,DD4,DRAWNULL),COLORLICYAN;
G4:IF(TS4>=0,GG4,DRAWNULL),COLORLICYAN;
STICKLINE(TJ4,GG4,DD4,0,0),COLORLICYAN;
STICKLINE(TS4>=0 AND ISLASTBAR,GG4,DD4,0,0),COLORLICYAN;
收4:=CONST(IF(BARSLAST(TIME=140000)>=0,REF(C,TS4),0));
收5:=DYNAINFO(7);
天數(shù)橫線4:=CONST(TS4);
IF(收5>=收4 AND TIME<=145900,D4+((G4-D4)/天數(shù)橫線4)*TS4,DRAWNULL),COLORRED;
IF(收5<收4 AND TIME<=145900,G4-((G4-D4)/天數(shù)橫線4)*TS4,DRAWNULL),COLORGREEN;
DRAWTEXT(TIME=93100 AND GT1>DT1,G1*0.997,'【漲幅】: ﹪'),COLORMAGENTA;
DRAWNUMBER(GT1>DT1 AND TIME=94500,G1*0.997,(D1-G1)/G1*100),COLORMAGENTA;
DRAWTEXT(TIME=93100 AND GT1<DT1,D1*1.003,'【跌幅】: ﹪'),COLORGREEN;
DRAWNUMBER(GT1<DT1 AND TIME=94500,D1*1.003,(D1-G1)/G1*100),COLORGREEN;
{股海網(wǎng)提供 www.guhai.com.cn}
DRAWTEXT(TIME=103100 AND GT2>DT2,G2*0.997,'【漲幅】: ﹪'),COLORMAGENTA;
DRAWNUMBER(GT2>DT2 AND TIME=104500,G2*0.997,(D2-G2)/G2*100),COLORMAGENTA;
DRAWTEXT(TIME=103100 AND GT2<DT2,D2*1.003,'【跌幅】: ﹪'),COLORGREEN;
DRAWNUMBER(GT2<DT2 AND TIME=104500,D2*1.003,(D2-G2)/G2*100),COLORGREEN;
DRAWTEXT(TIME=130100 AND GT3>DT3,G3*0.997,'【漲幅】: ﹪'),COLORMAGENTA;
DRAWNUMBER(GT3>DT3 AND TIME=131500,G3*0.997,(D3-G3)/G3*100),COLORMAGENTA;
DRAWTEXT(TIME=130100 AND GT3<DT3,D3*1.003,'【跌幅】: ﹪'),COLORGREEN;
DRAWNUMBER(GT3<DT3 AND TIME=131500,D3*1.003,(D3-G3)/G3*100),COLORGREEN;
DRAWTEXT(TIME=140100 AND GT4>DT4,G4*0.997,'【漲幅】: ﹪'),COLORMAGENTA;
DRAWNUMBER(GT4>DT4 AND TIME=141500,G4*0.997,(D4-G4)/G4*100),COLORMAGENTA;
DRAWTEXT(TIME=140100 AND GT4<DT4,D4*1.003,'【跌幅】: ﹪'),COLORGREEN;
DRAWNUMBER(GT4<DT4 AND TIME=141500,D4*1.003,(D4-G4)/G4*100),COLORGREEN;
D11:=YEAR AND MONTH AND DAY;
AA1:=STRCAT(CON2STR(YEAR,0),'年');
AA2:=STRCAT(CON2STR(MONTH,0),'月');
AA3:=STRCAT(CON2STR(DAY,0),'日');
AA4:=STRCAT('【',IF(WEEKDAY=1,'一',IF(WEEKDAY=2,'二',IF(WEEKDAY=3,'三',IF(WEEKDAY=4,'四',IF(WEEKDAY=5,'五',IF(WEEKDAY=6,'六','日')))))));
AA:=STRCAT(STRCAT(STRCAT(AA1,AA2),STRCAT(AA3,AA4)),'】');
DRAWTEXT_FIX(D11,0,1,0,AA),COLORGREEN;