「翔博精选指标」分时箱体主图(通达信公式 主图 源码 测试图)
2022-01-05原创 编 辑:翔博软件
{分时箱体主图}
HA : HHV(HIGH,120),COLORRED;
HHA : HHV(HIGH,30),COLOR8080FF;
LA : LLV(LOW,120),COLORGREEN;
LLA : LLV(LOW,30),COLORRED;
DRAWBAND(HA,RGB(0,15,15),HHA,RGB(0,15,15));
DRAWBAND(LA,RGB(0,15,15),LLA,RGB(0,15,15));
HA1 : HHV(HIGH,120),COLOR8F8F5F;
HHA1 : HHV(HIGH,30),COLOR8080FF;
LA1 : LLV(LOW,120),COLORGREEN;
LLA1 : LLV(LOW,30),COLORMAGENTA;
VAR0 := EMA(C,0) - EMA(C,5);
STICKLINE(VAR0 > 0,DYNAINFO(3),DYNAINFO(3) + (VAR0 * 1.5),0,1),COLOR545454;
STICKLINE(VAR0 <= 0,DYNAINFO(3),DYNAINFO(3) + (VAR0 * 1.5),0,1),COLOR545454;
VAR1 := MAX(DYNAINFO(3),DYNAINFO(5));
VAR2 := MIN(DYNAINFO(3),DYNAINFO(6));
VAR3 := VAR1 - VAR2;
VAR4 := VAR2 + ((VAR3 * 7) / 8);
VAR5 := VAR2 + ((VAR3 * 0.5) / 8);
DRAWICON(LONGCROSS(VAR5,C,2),C,34);
DRAWICON(LONGCROSS(C,VAR4,2),C,35);
VAR6 := ((C + HHV(MA(C,5),2)) + LLV(MA(C,5),2)) / 3;
VAR7 := EMA(VAR6,3);
VAR8 := REF(VAR7,1);
STICKLINE(VAR7 > VAR8,VAR7,VAR8,3,0),COLORRED;
STICKLINE(VAR7 < VAR8,VAR7,VAR8,3,0),COLORFF0800;
VAR9 := DYNAINFO(3);
VAR10 := IF(DYNAINFO(17) > 2.5,VAR9 - 0.15,DRAWNULL);
VAR11 := IF(DYNAINFO(17) > 5,VAR9 - 0.15,DRAWNULL);
DRAWBAND(VAR10,RGB(51,153,255),VAR10 + 0.015,RGB(51,153,255));
DRAWBAND(VAR11,RGB(255,118,188),VAR11 + 0.015,RGB(255,118,188));
VAR12 := DYNAINFO(11) + (DYNAINFO(11) * 0.021);
涨停 : IF(DYNAINFO(7) > VAR12,1,0),NODRAW,COLOR0088FF;
VAR13 := IF(涨停 = 1,C + 0.0075,DRAWNULL);
DRAWBAND(VAR13,RGB(255,211,0),C - 0.0075,RGB(255,125,0));
VAR14 := TIME = 100000;
VAR15 := BARSLAST(VAR14);
VAR16 := CONST(IF(VAR15 = 0,C,REF(C,VAR15)));
VAR17 := CONST(IF(VAR15,HHV(HIGH,0),REF(HHV(HIGH,0),VAR15)));
VAR18 := CONST(IF(VAR15,LLV(LOW,0),REF(LLV(LOW,0),VAR15)));
STICKLINE(VAR14 = 1,VAR17,VAR18,1.2,0),COLOR008888;
VAR19 := (SUM(VOL * C,0)) / SUM(VOL,0);
CONST(IF(VAR14,HHV(HIGH,0),REF(HHV(HIGH,0),VAR15))),DOTLINE,COLOR000066;
CONST(IF(VAR14,LLV(LOW,0),REF(LLV(LOW,0),VAR15))),DOTLINE,COLOR006600;
CONST(IF(VAR15,LLV(LOW,1),REF(LLV(LOW,0),VAR15))),COLOR888888;
CONST(IF(VAR15,HHV(LOW,1),REF(HHV(LOW,0),VAR15))),COLOR888888;
VAR20 := BARSLAST(TIME = 103000);
VAR21 := REF(HHV(C,0),VAR7 + 1);
VAR22 := REF(HHV(VOL,0),VAR7 + 1);
VAR23 := (VAR21 / DYNAINFO(3)) < 1.05;
VAR24 := (CROSS(C,VAR21) AND (VOL > VAR22)) AND VAR23;
HA : HHV(HIGH,120),COLORRED;
HHA : HHV(HIGH,30),COLOR8080FF;
LA : LLV(LOW,120),COLORGREEN;
LLA : LLV(LOW,30),COLORRED;
DRAWBAND(HA,RGB(0,15,15),HHA,RGB(0,15,15));
DRAWBAND(LA,RGB(0,15,15),LLA,RGB(0,15,15));
HA1 : HHV(HIGH,120),COLOR8F8F5F;
HHA1 : HHV(HIGH,30),COLOR8080FF;
LA1 : LLV(LOW,120),COLORGREEN;
LLA1 : LLV(LOW,30),COLORMAGENTA;
VAR0 := EMA(C,0) - EMA(C,5);
STICKLINE(VAR0 > 0,DYNAINFO(3),DYNAINFO(3) + (VAR0 * 1.5),0,1),COLOR545454;
STICKLINE(VAR0 <= 0,DYNAINFO(3),DYNAINFO(3) + (VAR0 * 1.5),0,1),COLOR545454;
VAR1 := MAX(DYNAINFO(3),DYNAINFO(5));
VAR2 := MIN(DYNAINFO(3),DYNAINFO(6));
VAR3 := VAR1 - VAR2;
VAR4 := VAR2 + ((VAR3 * 7) / 8);
VAR5 := VAR2 + ((VAR3 * 0.5) / 8);
DRAWICON(LONGCROSS(VAR5,C,2),C,34);
DRAWICON(LONGCROSS(C,VAR4,2),C,35);
VAR6 := ((C + HHV(MA(C,5),2)) + LLV(MA(C,5),2)) / 3;
VAR7 := EMA(VAR6,3);
VAR8 := REF(VAR7,1);
STICKLINE(VAR7 > VAR8,VAR7,VAR8,3,0),COLORRED;
STICKLINE(VAR7 < VAR8,VAR7,VAR8,3,0),COLORFF0800;
VAR9 := DYNAINFO(3);
VAR10 := IF(DYNAINFO(17) > 2.5,VAR9 - 0.15,DRAWNULL);
VAR11 := IF(DYNAINFO(17) > 5,VAR9 - 0.15,DRAWNULL);
DRAWBAND(VAR10,RGB(51,153,255),VAR10 + 0.015,RGB(51,153,255));
DRAWBAND(VAR11,RGB(255,118,188),VAR11 + 0.015,RGB(255,118,188));
VAR12 := DYNAINFO(11) + (DYNAINFO(11) * 0.021);
涨停 : IF(DYNAINFO(7) > VAR12,1,0),NODRAW,COLOR0088FF;
VAR13 := IF(涨停 = 1,C + 0.0075,DRAWNULL);
DRAWBAND(VAR13,RGB(255,211,0),C - 0.0075,RGB(255,125,0));
VAR14 := TIME = 100000;
VAR15 := BARSLAST(VAR14);
VAR16 := CONST(IF(VAR15 = 0,C,REF(C,VAR15)));
VAR17 := CONST(IF(VAR15,HHV(HIGH,0),REF(HHV(HIGH,0),VAR15)));
VAR18 := CONST(IF(VAR15,LLV(LOW,0),REF(LLV(LOW,0),VAR15)));
STICKLINE(VAR14 = 1,VAR17,VAR18,1.2,0),COLOR008888;
VAR19 := (SUM(VOL * C,0)) / SUM(VOL,0);
CONST(IF(VAR14,HHV(HIGH,0),REF(HHV(HIGH,0),VAR15))),DOTLINE,COLOR000066;
CONST(IF(VAR14,LLV(LOW,0),REF(LLV(LOW,0),VAR15))),DOTLINE,COLOR006600;
CONST(IF(VAR15,LLV(LOW,1),REF(LLV(LOW,0),VAR15))),COLOR888888;
CONST(IF(VAR15,HHV(LOW,1),REF(HHV(LOW,0),VAR15))),COLOR888888;
VAR20 := BARSLAST(TIME = 103000);
VAR21 := REF(HHV(C,0),VAR7 + 1);
VAR22 := REF(HHV(VOL,0),VAR7 + 1);
VAR23 := (VAR21 / DYNAINFO(3)) < 1.05;
VAR24 := (CROSS(C,VAR21) AND (VOL > VAR22)) AND VAR23;
DRAWICON(VAR24,VAR9 - 0.06,13);