北沙分时矩形主图公式、说明
{实时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),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);
天数横线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.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;
{公式网提供 www.gpxiazai.com}
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;
- 上一篇公式:通达信专吃主升副图公式 升级版 原码 说明
- 下一篇公式:出现笑脸时变为选股公式