最新公告
  • 欢迎您光临九毛八公式指标网www.9m8.cn,本站全新改版试运行,期间内容全部免费,欢迎下载!欢迎加入本站VIP
  • 五彩k线主图指标公式(通达信k线主图公式)

    正文概述    2024-05-04 04:01:16  

    公式解读:


    一、五彩主图指标公式

     

    十字星:=CLOSE=OPENANDHIGH  

    DRAWTEXT(十字星,L, {1}十字星  

    早晨之星:=(REF(CLOSE,2)/REF(OPEN,2) 0.95)  

    (REF(OPEN,1) REF(CLOSE,2))  

    (ABS(REF(OPEN,1)-REF(CLOSE,1))/REF(CLOSE,1) 0.03)  

    CLOSE/OPEN 1.05 CLOSE REF(CLOSE,2); 

    DRAWTEXT(早晨之星,L*1.02, {2}早晨之星  

    黄昏之星:=REF(CLOSE,2)/REF(OPEN,2) 1.05  

    REF(OPEN,1) REF(CLOSE,2)  

    ABS(REF(OPEN,1)-REF(CLOSE,1))/REF(CLOSE,1) 0.03  

    CLOSE/OPEN 0.95 CLOSE REF(CLOSE,2); 

    DRAWTEXT(黄昏之星,L, {3}黄昏之星  

    长十字:=CLOSE=OPEN HIGH/LOW 1.03; 

    DRAWTEXT(长十字,L*1.02, {4}长十字  

    身怀六甲:=ABS(REF(CLOSE,1)-REF(OPEN,1))/REF(CLOSE,1) 0.04  

    ABS(CLOSE-OPEN)/CLOSE 0.005  

    MAX(CLOSE,OPEN) MAX(REF(CLOSE,1),REF(OPEN,1))  

    MIN(CLOSE,OPEN) MIN(REF(CLOSE,1),REF(OPEN,1)); 

    DRAWTEXT(身怀六甲,L, {5}身怀六甲  

    三个白武士:=UPNDAY(CLOSE,3) NDAY(CLOSE,OPEN,3); 

    DRAWTEXT(三个白武士,L*1.01, {6}三个白武士  

    三只乌鸦:=DOWNNDAY(CLOSE,3) NDAY(OPEN,CLOSE,3); 

    DRAWTEXT(三只乌鸦,L, {7}三只乌鸦  

    光头阳线:=HIGH=CLOSE HIGH  

    DRAWTEXT(光头阳线,H, {8}光头阳线 ),COLORMAGENTA; 

    光脚阴线:=LOW=CLOSE HIGH  

    DRAWTEXT(光脚阴线,L, {9}光脚阴线  

    垂死十字:=CLOSE=OPEN CLOSE=LOW CLOSE HIGH; 

    DRAWTEXT(垂死十字,L, {10}垂死十字  

    早晨十字星:=REF(CLOSE,2)/REF(OPEN,2) 0.95  

    REF(OPEN,1) REF(CLOSE,2)  

    REF(OPEN,1)=REF(CLOSE,1)  

    CLOSE/OPEN 1.05 CLOSE REF(CLOSE,2); 

    DRAWTEXT(早晨十字星,L, {11}早晨十字星  

    黄昏十字星:=REF(CLOSE,2)/REF(OPEN,2) 1.05  

    REF(OPEN,1) REF(CLOSE,2)  

    REF(OPEN,1)=REF(CLOSE,1)  

    CLOSE/OPEN 0.95 CLOSE REF(CLOSE,2); 

    DRAWTEXT(黄昏十字星,L, {12}黄昏十字星  

    射击之星:=MIN(OPEN,CLOSE)=LOW  

    HIGH-LOW 3*(MAX(OPEN,CLOSE)-LOW)  

    CLOSE MA(CLOSE,5); 

    DRAWTEXT(射击之星,L, {13}射击之星  

    倒转锤头:=MIN(OPEN,CLOSE)=LOW  

    HIGH-LOW 3*(MAX(OPEN,CLOSE)-LOW)  

    CLOSE MA(CLOSE,5); 

    DRAWTEXT(倒转锤头,L, {14}倒转锤头  

    锤头:=HIGH=MAX(OPEN,CLOSE)  

    HIGH-LOW 3*(HIGH-MIN(OPEN,CLOSE))  

    CLOSE MA(CLOSE,5); 

    DRAWTEXT(锤头,L*1.03, {15}锤头  

    吊颈:=HIGH=MAX(OPEN,CLOSE)  

    HIGH-LOW 3*(HIGH-MIN(OPEN,CLOSE))  

    CLOSE MA(CLOSE,5); 

    DRAWTEXT(吊颈,L*1.03, {16}吊颈  

    穿头破脚:=(REF(CLOSE,1)/REF(OPEN,1) 1.03  

    CLOSE/OPEN 0.96  

    CLOSE REF(OPEN,1) OPEN REF(CLOSE,1))|| 

    (REF(CLOSE,1)/REF(OPEN,1) 0.97  

    CLOSE/OPEN 1.04  

    CLOSE REF(OPEN,1) OPEN REF(CLOSE,1)); 

    DRAWTEXT(穿头破脚,L, {17}穿头破脚  

    AA:=VOL REF(VOL,1)||VOL (CAPITAL*0.1); 

    BB:=OPEN =(REF(HIGH,1)) REF(HIGH,1) (REF(HIGH,2)*1.06); 

    CC:=CLOSE (REF(CLOSE,1))-(REF(CLOSE,1)*0.01); 

    DD:=CLOSE (HIGH*0.965) HIGH (OPEN*1.05); 

    EE:=LOW OPEN LOW CLOSE HIGH (REF(CLOSE,1)*1.06); 

    FF:=(HIGH-(MAX(OPEN,CLOSE)))/2 (MIN(OPEN,CLOSE))-LOW; 

    GG:=(ABS(OPEN-CLOSE))/2 (MIN(OPEN,CLOSE)-LOW); 

    剑:=AA BB CC DD EE FF  

    DRAWTEXT(剑,L, {18}剑  

    A:=CLOSE OPEN; 

    B:=A CLOSE MA(CLOSE,20) CLOSE MA(CLOSE,40) CLOSE MA(CLOS 

    E,60); 

    C1:=B OPEN MA(CLOSE,40) OPEN MA(CLOSE,60); 

    出水芙蓉:=C1 (CLOSE-OPEN) 0.0618*CLOSE; 

    DRAWTEXT(出水芙蓉,L*1.04, {19}出水芙蓉  

    大阳烛:=CLOSE/OPEN 1.05ANDHIGH/LOW CLOSE/OPEN+0.018; 

    DRAWTEXT(大阳烛,L, {20}大阳烛  

    大阴烛:=OPEN/CLOSE 1.05ANDHIGH/LOW OPEN/CLOSE+0.018; 

    DRAWTEXT(大阴烛,L, {21}大阴烛  

    长下影:=(MIN(CLOSE,OPEN)-LOW)/(HIGH-LOW) 0.667; 

    DRAWTEXT(长下影,L, {22}长下影 ),COLORMAGENTA; 

    长上影:=(HIGH-MAX(CLOSE,OPEN))/(HIGH-LOW) 0.667,COLORBLUE; 

    DRAWTEXT(长上影,L, {23}长上影 ),COLORGREEN; 

    乌云盖顶:=REF(CLOSE,1)/REF(OPEN,1) 1.03ANDCLOSE/OPEN 0.97AND 

    OPEN REF(CLOSE,1)ANDCLOSE REF(CLOSE,1); 

    DRAWTEXT(乌云盖顶,L, {24}乌云盖顶 ),COLORGREEN; 

    曙光初现:=REF(CLOSE,1)/REF(OPEN,1) 0.97ANDCLOSE/OPEN 1.03AND 

    OPEN REF(CLOSE,1)ANDCLOSE REF(CLOSE,1); 

    DRAWTEXT(曙光初现,L, {25}曙光初现 ),COLORGREEN; 

    平顶:=ABS(HIGH-REF(HIGH,1))/HIGH 0.001; 

    DRAWTEXT(平顶,L, {26}平顶 ),COLORGREEN; 

    平底:=(ABS(LOW-REF(LOW,1))/LOW 0.001AND 

    ABS(REF(LOW,1)-REF(LOW,2))/REF(LOW,1) =0.001); 

    DRAWTEXT(平底,L, {27}平底 ),COLORGREEN; 

    红三兵:=REF(CLOSE,2) REF(OPEN,2)ANDREF(CLOSE,1) REF(OPEN,1)AND 

    CLOSE OPEN 

    ANDREF(CLOSE,1) REF(CLOSE,2)ANDCLOSE REF(CLOSE,1); 

    DRAWTEXT(红三兵,L*1.02, {28}红三兵 ),COLORLIMAGENTA; 

    双飞乌鸦:=REF(CLOSE,1) REF(OPEN,1)ANDCLOSE OPENAND 

    CLOSE/OPEN 0.98; 

    DRAWTEXT(双飞乌鸦,L, {29}双飞乌鸦 ),COLORGREEN; 

    孕育线:=REF(CLOSE,2) REF(OPEN,2)AND 

    (REF(CLOSE,2)-REF(OPEN,2))/REF(OPEN,2) =2/100AND 

    REF(OPEN,1) =REF(CLOSE,1)AND 

    (REF(OPEN,1)-REF(CLOSE,1))/REF(CLOSE,1) =2/100AND 

    REF(OPEN,1) =REF(CLOSE,2)ANDREF(CLOSE,1) =REF(OPEN,2)AND 

    C =OPENAND 

    (CLOSE-OPEN)/OPEN =2/100ANDCLOSE =REF(OPEN,1)AND 

    OPEN =REF(CLOSE,1)AND 

    (MAX(CLOSE,REF(C,2))-MIN(CLOSE,REF(CLOSE,2)))/MIN(CLOSE,REF(CLOSE, 

    2)) =1/100; 

    DRAWTEXT(孕育线,L, {30}孕育线 ),COLORGREEN; 

    多方炮:=REF(CLOSE,2) REF(OPEN,2)ANDREF(CLOSE,1) REF(OPEN,1)AND 

    CLOSE OPEN; 

    DRAWTEXT(多方炮,L, {31}多方炮 ),COLORGREEN; 

    好友反攻:=(REF(CLOSE,1) REF(OPEN,1)ANDCLOSE OPENAND 

    ABS(CLOSE-REF(CLOSE,1))/CLOSE 0.002) 

    OR(REF(CLOSE,1) REF(OPEN,1)ANDCLOSE OPENAND 

    ABS(CLOSE-REF(CLOSE,1))/CLOSE 0.002); 

    DRAWTEXT(好友反攻,L, {32}好友反攻 ),COLORGREEN; 

    倾盆大雨:=REF(C,1)/REF(O,1) =1.03ANDO REF(C,1)ANDO REF(O,1) 

    ANDC REF(O,1); 

    DRAWTEXT(倾盆大雨,L, {33}倾盆大雨 ),COLORGREEN; 

    BACKSET( 

    REF(CLOSE,2)/REF(OPEN,2) 0.95AND 

    REF(OPEN,1) REF(CLOSE,2)AND 

    ABS(REF(OPEN,1)-REF(CLOSE,1))/REF(CLOSE,1) 0.03AND 

    CLOSE/OPEN 1.05ANDCLOSE REF(CLOSE,2), 

    3) 

    五彩K线公式:K120(黄昏之星)缺省周期:日线 

    BACKSET( 

    REF(CLOSE,2)/REF(OPEN,2) 1.03AND 

    REF(OPEN,1) REF(CLOSE,2)AND 

    ABS(REF(OPEN,1)-REF(CLOSE,1))/REF(CLOSE,1) 0.02AND 

    CLOSE/OPEN 0.97ANDCLOSE REF(CLOSE,2), 

    3) 

    五彩K线公式:K130(十字星)缺省周期:日线 

    CLOSE=OPENANDHIGH LOW 

    五彩K线公式:K132(长十字)缺省周期:日线 

    CLOSE=OPENAND 

    HIGH/LOW 1.03 

    五彩K线公式:K134(垂死十字)缺省周期:日线 

    CLOSE=OPENAND 

    CLOSE=LOWAND 

    CLOSE HIGH 

    五彩K线公式:K140(早晨十字星)缺省周期:日线 

    BACKSET( 

    REF(CLOSE,2)/REF(OPEN,2) 0.95AND 

    REF(OPEN,1) REF(CLOSE,2)AND 

    REF(OPEN,1)=REF(CLOSE,1)AND 

    CLOSE/OPEN 1.05ANDCLOSE REF(CLOSE,2), 

    3) 

    五彩K线公式:K150(黄昏十字星)缺省周期:日线 

    BACKSET( 

    REF(CLOSE,2)/REF(OPEN,2) 1.05AND 

    REF(OPEN,1) REF(CLOSE,2)AND 

    REF(OPEN,1)=REF(CLOSE,1)AND 

    CLOSE/OPEN 0.95ANDCLOSE REF(CLOSE,2), 

    3) 

    五彩K线公式:K160(射击之星)缺省周期:日线 

    MIN(OPEN,CLOSE)=LOWAND 

    HIGH-LOW 3*(MAX(OPEN,CLOSE)-LOW)AND 

    CLOSE MA(CLOSE,5) 

    五彩K线公式:K165(倒转锤头)缺省周期:日线 

    MIN(OPEN,CLOSE)=LOWAND 

    HIGH-LOW 3*(MAX(OPEN,CLOSE)-LOW)AND 

    CLOSE MA(CLOSE,5) 

    五彩K线公式:K170(锤头)缺省周期:日线 

    HIGH=MAX(OPEN,CLOSE)AND 

    HIGH-LOW 3*(HIGH-MIN(OPEN,CLOSE))AND 

    CLOSE MA(CLOSE,5) 

    五彩K线公式:K180(吊颈)缺省周期:日线 

    HIGH=MAX(OPEN,CLOSE)AND 

    HIGH-LOW 3*(HIGH-MIN(OPEN,CLOSE))AND 

    CLOSE MA(CLOSE,5) 

    五彩K线公式:K190(穿头破脚)缺省周期:日线 

    BACKSET( 

    (REF(CLOSE,1)/REF(OPEN,1) 1.03AND 

    CLOSE/OPEN 0.96AND 

    CLOSE REF(OPEN,1)ANDOPEN REF(CLOSE,1)) 

    OR 

    (REF(CLOSE,1)/REF(OPEN,1) 0.97AND 

    CLOSE/OPEN 1.04AND 

    CLOSE REF(OPEN,1)ANDOPEN REF(CLOSE,1)), 

    2) 

    五彩K线公式:K200(乌云盖顶)缺省周期:日线 

    BACKSET( 

    REF(CLOSE,1)/REF(OPEN,1) 1.03AND 

    CLOSE/OPEN 0.97AND 

    OPEN REF(CLOSE,1)AND 

    CLOSE REF(CLOSE,1), 

    3) 

    五彩K线公式:K210(曙光初现)缺省周期:日线 

    BACKSET( 

    REF(CLOSE,1)/REF(OPEN,1) 0.97AND 

    CLOSE/OPEN 1.03AND 

    OPEN REF(CLOSE,1)AND 

    CLOSE REF(CLOSE,1), 

    2) 

    五彩K线公式:K220(身怀六甲)缺省周期:日线 

    BACKSET( 

    ABS(REF(CLOSE,1)-REF(OPEN,1))/REF(CLOSE,1) 0.04AND 

    ABS(CLOSE-OPEN)/CLOSE 0.005AND 

    MAX(CLOSE,OPEN) MAX(REF(CLOSE,1),REF(OPEN,1))AND 

    MIN(CLOSE,OPEN) MIN(REF(CLOSE,1),REF(OPEN,1)), 

    2) 

    五彩K线公式:K230(十字胎)缺省周期:日线 

    BACKSET( 

    ABS(REF(CLOSE,1)-REF(OPEN,1))/REF(CLOSE,1) 0.04AND 

    CLOSE=OPENAND 

    CLOSE MAX(REF(CLOSE,1),REF(OPEN,1))AND 

    CLOSE MIN(REF(CLOSE,1),REF(OPEN,1)), 

    2) 

    五彩K线公式:K240(平顶)缺省周期:日线 

    BACKSET(ABS(HIGH-REF(HIGH,1))/HIGH 0.001,2) 

    五彩K线公式:K250(平底)缺省周期:日线 

    BACKSET((ABS(LOW-REF(LOW,1))/LOW 0.001and 

    abs(ref(low,1)-ref(low,2))/ref(low,1) =0.001),2) 

    五彩K线公式:K260(大阳烛)缺省周期:日线 

    CLOSE/OPEN 1.05AND 

    HIGH/LOW CLOSE/OPEN+0.018 

    五彩K线公式:K270(大阴烛)缺省周期:日线 

    OPEN/CLOSE 1.05AND 

    HIGH/LOW OPEN/CLOSE+0.018 

    五彩K线公式:K280(好友反攻)缺省周期:日线 

    BACKSET( 

    (REF(CLOSE,1) REF(OPEN,1)AND 

    CLOSE OPENAND 

    ABS(CLOSE-REF(CLOSE,1))/CLOSE 0.002) 

    OR 

    (REF(CLOSE,1) REF(OPEN,1)AND 

    CLOSE OPENAND 

    ABS(CLOSE-REF(CLOSE,1))/CLOSE 0.002), 


    image.png



    二、通达信k线主图公式

     

    今量:VOL; 

    昨量:REF(VOL,1); 

    前量:REF(VOL,2); 

    昨开:REF(O,1); 

    昨收:REF(C,1); 

    前开:REF(O,2); 

    前收:REF(C,2); 

    ZO:REF(O,1); 

    ZC:REF(C,1); 

    ZH:REF(H,1); 

    ZL:REF(L,1); 

    JO:REF(O,2); 

    JC:REF(C,2); 

    JH:REF(H,2); 

    JL:REF(L,2); 

    2:以上引用指标独立创建一个指标,下面是主图指标同时创建主图叠加指标 

    名字:分时主图 

    前量:= FSKY.前量#DAY  

    昨量:= FSKY.昨量#DAY  

    今量:= FSKY.今量#DAY  

    前总:=前量; 

    昨总:=昨量;总:=今量,NODRAW; 

    BMM:=MAX(前总,昨总); 

    AMM:=IF(总/BMM 2,BMM*3,BMM); 

    MM:=200/AMM; 

    KP:=DYNAINFO(4); 

    ZX:=DYNAINFO(7); 

    A1:=IF(ZX =KP,355,0); 

    A2:=IF(ZX =KP,0,355); 

    A3:=IF(ZX =KP,0,0); 

    DRAWRECTREL(0,80,MM*今量,110,RGB(A1,A2,A3)); 

    昨开:= FSKY.昨开#DAY  

    昨收:= FSKY.昨收#DAY  

    A4:=IF(昨收 =昨开,355,0); 

    A5:=IF(昨收 =昨开,0,355); 

    A6:=IF(昨收 =昨开,0,0); 

    DRAWRECTREL(0,40,MM*昨量,70,RGB(A4,A5,A6)); 

    前开:= FSKY.前开#DAY  

    前收:= FSKY.前收#DAY  

    A7:=IF(前收 =前开,355,0); 

    A8:=IF(前收 =前开,0,355); 

    A9:=IF(前收 =前开,0,0); 

    DRAWRECTREL(0,0,MM*前量,30,RGB(A7,A8,A9)); 

    KP:=DYNAINFO(4); 

    ZS:=DYNAINFO(3); 

    ZG:=DYNAINFO(5); 

    ZD:=DYNAINFO(6); 

    OP:=500-(KP/ZS-1)*4000; 

    CL:=500-(ZX/ZS-1)*4000; 

    HI:=500-(ZG/ZS-1)*4000; 

    LO:=500-(ZD/ZS-1)*4000; 

    N1:=IF(TIME =130000ORTIME 91500,360,900); 

    DRAWRECTREL(N1+4,OP,N1+8,HI,RGB(350,0,350)); 

    DRAWRECTREL(N1+4,CL,N1+8,LO,RGB(0,355,0)); 

    Q1:=IF(ZX =KP,350,0); 

    Q2:=IF(ZX =KP,0,350); 

    Q3:=IF(ZX =KP,0,0); 

    DRAWRECTREL(N1-10,OP,N1+22,CL,RGB(Q1,Q2,Q3)); 

    ZO:= FSKY.ZO#DAY  

    ZC:= FSKY.ZC#DAY  

    ZH:= FSKY.ZH#DAY  

    ZL:= FSKY.ZL#DAY  

    ZKP:=500-(ZO/ZS-1)*4000; 

    ZCP:=500-(ZC/ZS-1)*4000; 

    ZZG:=500-(ZH/ZS-1)*4000; 

    ZZD:=500-(ZL/ZS-1)*4000; 

    DRAWRECTREL(N1-36,ZKP,N1-32,ZZG,RGB(355,0,355)); 

    DRAWRECTREL(N1-36,ZCP,N1-32,ZZD,RGB(0,355,0)); 

    Q4:=IF(ZC =ZO,355,0); 

    Q5:=IF(ZC =ZO,0,355); 

    Q6:=IF(ZC =ZO,0,0); 

    DRAWRECTREL(N1-49,ZKP,N1-17,ZCP,RGB(Q4,Q5,Q6)); 

    JO:= FSKY.JO#DAY  

    JC:= FSKY.JC#DAY  

    JH:= FSKY.JH#DAY  

    JL:= FSKY.JL#DAY  

    ZZKP:=500-(JO/ZS-1)*4000; 

    ZZCP:=500-(JC/ZS-1)*4000; 

    ZZZG:=500-(JH/ZS-1)*4000; 

    ZZZD:=500-(JL/ZS-1)*4000; 

    DRAWRECTREL(N1-76,ZZKP,N1-72,ZZZG,RGB(355,0,355)); 

    DRAWRECTREL(N1-76,ZZCP,N1-72,ZZZD,RGB(0,355,0)); 

    Q7:=IF(JC =JO,355,0); 

    Q8:=IF(JC =JO,0,355); 

    Q9:=IF(JC =JO,0,0); 

    DRAWRECTREL(N1-89,ZZKP,N1-57,ZZCP,RGB(Q7,Q8,Q9)); 

    ZS:=DYNAINFO(3); 

    ZG:=DYNAINFO(5); 

    ZD:=DYNAINFO(6); 

    OP:=500-(KP/ZS-1)*4000; 

    CL:=500-(ZX/ZS-1)*4000; 

    HI:=500-(ZG/ZS-1)*4000; 

    LO:=500-(ZD/ZS-1)*4000; 

    N1:=IF(TIME =130000ORTIME 91500,360,900); 

    DRAWRECTREL(N1+4,OP,N1+8,HI,RGB(350,0,350)); 

    DRAWRECTREL(N1+4,CL,N1+8,LO,RGB(0,355,0)); 

    Q1:=IF(ZX =KP,350,0); 

    Q2:=IF(ZX =KP,0,350); 

    BBI:(MA(C,3)+MA(C,6)+MA(C,12)+MA(C,24))/4; 

    MA(C,N1);MA(C,N2);MA(C,N3),LINETHICK2;MA(C,N4),COLORLIRED,LINETHICK2; 

    买线:=EMA(C,2); 

    卖线:=EMA(SLOPE(C,21)*20+C,42); 

    中:=(MA(CLOSE,30)+MA(C,72))/2,COLOR999999,LINETHICK0; 

    HLY1:=中*1.1,POINTDOT,COLOR999999,LINETHICK0; 

    VAR61:=(CLOSE*2+HIGH+LOW)/4; 

    VAR62:=EMA(VAR61,3); 

    VAR63:=EMA(VAR62,6); 

    L1:=EMA(VAR61,3),LINETHICK0; 

    L2:=EMA(VAR62,4),LINETHICK0; 

    L3:=EMA(VAR63,5),LINETHICK0; 

    {正常上涨} 

    STICKLINE(C =O,H,L,0,0),COLOR0000FF;{红色} 

    STICKLINE(CLOSE =OPEN,CLOSE,OPEN,3.2,0),COLOR000055; 

    STICKLINE(CLOSE =OPEN,CLOSE,OPEN,2.6,0),COLOR000077; 

    STICKLINE(CLOSE =OPEN,CLOSE,OPEN,1.9,0),COLOR000099; 

    STICKLINE(CLOSE =OPEN,CLOSE,OPEN,1.1,0),COLOR0000BB; 

    STICKLINE(CLOSE =OPEN,CLOSE,OPEN,0.2,0),COLOR0000FF; 

    {STICKLINE(CLOSE OPEN,CLOSE,OPEN,1.2,0),COLOR0000EE; 

    STICKLINE(CLOSE OPEN,CLOSE,OPEN,0.4,0),COLOR0000FF;} 

    {正常下跌} 

    STICKLINE(OPEN =CLOSE,H,L,0,0),COLORFFFF00;{天蓝} 

    STICKLINE(OPEN =CLOSE,CLOSE,OPEN,3.2,0),COLORFF5500; 

    STICKLINE(OPEN =CLOSE,CLOSE,OPEN,2.6,0),COLORFF7700; 

    STICKLINE(OPEN =CLOSE,CLOSE,OPEN,1.9,0),COLORFF9900; 

    STICKLINE(OPEN =CLOSE,CLOSE,OPEN,1.1,0),COLORFFBB00; 

    STICKLINE(OPEN =CLOSE,CLOSE,OPEN,0.2,0),COLORFFDD00; 

    {STICKLINE(OPEN =CLOSE,CLOSE,OPEN,1.2,0),COLORFFEE00; 

    STICKLINE(OPEN =CLOSE,CLOSE,OPEN,0.4,0),COLORFFFF00;} 

    {整理下跌区} 

    {STICKLINE(L1 L2,H,LOW,0,0),COLORFFFFFF;{灰色} 

    {STICKLINE(L1 L2,CLOSE,OPEN,3.0,0),COLOR555555; 

    STICKLINE(L1 L2,CLOSE,OPEN,2.5,0),COLOR777777; 

    STICKLINE(L1 L2,CLOSE,OPEN,1.9,0),COLOR999999; 

    STICKLINE(L1 L2,CLOSE,OPEN,1.2,0),COLORBBBBBB; 

    STICKLINE(L1 L2,CLOSE,OPEN,0.4,0),COLORDDDDDD;} 

    {STICKLINE(L1 L2,CLOSE,OPEN,3,0),COLORFFEE00; 

    STICKLINE(L1 L2,CLOSE,OPEN,2,0),COLORFFFF00;} 

    {下跌开始} 

    VAR44:=REF(L1,1) L1ANDL1  

    STICKLINE(VAR44,H,LOW,0,0),COLORFF0000;{蓝色} 

    {STICKLINE(VAR44,CLOSE,OPEN,3.0,0),COLOR550000; 

    STICKLINE(VAR44,CLOSE,OPEN,2.5,0),COLOR660000;} 

    STICKLINE(VAR44,CLOSE,OPEN,3.2,0),COLOR660000; 

    STICKLINE(VAR44,CLOSE,OPEN,2.6,0),COLORAA0000; 

    STICKLINE(VAR44,CLOSE,OPEN,1.9,0),COLOREE1100; 

    STICKLINE(VAR44,CLOSE,OPEN,1.1,0),COLORFF3300; 

    STICKLINE(VAR44,CLOSE,OPEN,0.2,0),COLORFF5500; 

    {顶部钝化区} 

    STICKLINE((CLOSE =HLY1),H,LOW,0,0),COLORFF00FF;{粉色} 

    STICKLINE((CLOSE =HLY1),CLOSE,OPEN,3.2,0),COLOR770077; 

    STICKLINE((CLOSE =HLY1),CLOSE,OPEN,2.6,0),COLORAA00AA; 

    STICKLINE((CLOSE =HLY1),CLOSE,OPEN,1.9,0),COLORDD00DD; 

    STICKLINE((CLOSE =HLY1),CLOSE,OPEN,1.1,0),COLORFF22FF; 

    STICKLINE((CLOSE =HLY1),CLOSE,OPEN,0.2,0),COLORFF66FF; 

    {STICKLINE((CLOSE =HLY1),CLOSE,OPEN,3,0),COLORFFDDFF; 

    STICKLINE((CLOSE =HLY1),CLOSE,OPEN,2,0),COLORFFEEFF;} 

    {单边下跌} 

    STICKLINE(买线 卖线,H,LOW,0,0),COLOR00FF00;{绿色} 

    STICKLINE(买线 卖线,CLOSE,OPEN,3.2,0),COLOR004400; 

    STICKLINE(买线 卖线,CLOSE,OPEN,2.6,0),COLOR005500; 

    STICKLINE(买线 卖线,CLOSE,OPEN,1.9,0),COLOR007700; 

    STICKLINE(买线 卖线,CLOSE,OPEN,1.1,0),COLOR009900; 

    STICKLINE(买线 卖线,CLOSE,OPEN,0.2,0),COLOR00CC00; 

    {STICKLINE(买线 卖线,CLOSE,OPEN,3,0),COLOR00DD00; 

    STICKLINE(买线 卖线,CLOSE,OPEN,2,0),COLOR00FF00;} 

    {向上变盘} 

    STICKLINE(CROSS(买线,卖线),H,L,0,0),COLOR0033DD;{橘黄} 

    STICKLINE(CROSS(买线,卖线),C,OPEN,3.2,0),COLOR000077; 

    STICKLINE(CROSS(买线,卖线),C,OPEN,2.6,0),COLOR003399; 

    STICKLINE(CROSS(买线,卖线),C,OPEN,1.9,0),COLOR0033DD; 

    STICKLINE(CROSS(买线,卖线),C,OPEN,1.1,0),COLOR0055FF; 

    STICKLINE(CROSS(买线,卖线),C,OPEN,0.2,0),COLOR0099FF; 

    {向下变盘} 

    STICKLINE(CROSS(卖线,买线),H,L,0,0),COLOR00FFFF;{黄色} 

    STICKLINE(CROSS(卖线,买线),C,OPEN,3.2,0),COLOR008888; 

    STICKLINE(CROSS(卖线,买线),C,OPEN,2.6,0),COLOR00AAAA; 

    STICKLINE(CROSS(卖线,买线),C,OPEN,1.9,0),COLOR00CCCC; 

    STICKLINE(CROSS(卖线,买线),C,OPEN,1.1,0),COLOR00EEEE; 

    STICKLINE(CROSS(卖线,买线),C,OPEN,0.2,0),COLOR44FFFF;


    image.png


    [源码注释]通达信公式动态公式解读

    X_1赋值:1日前的最近2日一直存在收阴线 AND 收阳线

    X_2赋值:收盘价的5日简单移动平均

    X_3赋值:收盘价的10日简单移动平均

    X_4赋值:(X_2-收盘价)/收盘价 3/100

    X_5赋值:(X_3-X_2)/X_2 0.03

    X_6赋值:30日内收盘价的最低值=120日内收盘价的最低值

    X_7赋值:X_4 AND X_5 AND X_6

    X_8赋值:统计60日中满足收盘价/1日前的收盘价 1.097的天数 AND (收盘价的250日简单移动平均 =30日前的收盘价的250日简单移动平均 OR 收盘价 收盘价的250日简单移动平均) AND 收盘价的有效数据周期数 100

    X_9赋值:上次X_7距今天数 =2 AND X_1 AND X_8

    X_10赋值:485日内最高价的最高值的17日简单移动平均

    X_11赋值:222日内最高价的最高值的17日简单移动平均

    X_12赋值:96日内最高价的最高值的17日简单移动平均

    X_13赋值:485日内最低价的最低值的17日简单移动平均

    X_14赋值:222日内最低价的最低值的17日简单移动平均

    X_15赋值:96日内最低价的最低值的17日简单移动平均

    X_16赋值:(X_13*0.96+X_14*0.96+X_15*0.96+X_10*0.558+X_11*0.558+X_12*0.558)/6的17日简单移动平均

    X_17赋值:(X_13*1.25+X_14*1.23+X_15*1.2+X_10*0.55+X_11*0.55+X_12*0.65)/6的17日简单移动平均

    X_18赋值:(X_13*1.3+X_14*1.3+X_15*1.3+X_10*0.68+X_11*0.68+X_12*0.68)/6的17日简单移动平均

    X_19赋值:(X_16*3+X_17*2+X_18)/6*1.738的17日简单移动平均

    X_20赋值:如果1 =1341231,返回X_19,否则返回X_19*日

    X_21赋值:最低价

    X_22赋值:1日前的最低价

    X_23赋值:X_21-X_22的绝对值的3日[1日权重]移动平均/X_21-X_22和0的较大值的3日[1日权重]移动平均*100

    X_24赋值:如果收盘价*1.35 =X_20,返回X_23*10,否则返回X_23/10的3日简单移动平均

    X_25赋值:30日内最低价的最低值

    X_26赋值:30日内X_24的最高值

    X_27赋值:13412319

    X_28赋值:如果1 =X_27,返回如果最低价 =X_25,返回(X_24+X_26*2)/2,否则返回0的3日简单移动平均,否则返回100000000

    X_29赋值:2日前的X_28 3日前的X_28 AND X_28 1日前的X_28

    X_9 AND X_29



    推荐阅读:五色k线公式源码


     

    Z1:=STRCAT(HYBLOCK,  

    Z2:=STRCAT(Z1,DYBLOCK); 

    Z3:=STRCAT(Z2,  

    Z4:DRAWTEXT_FIX(ISLASTBAR,0,0,0,STRCAT(Z3,GNBLOCK)),COLORRED; 

    DRAWTEXT_FIX(ISLASTBAR,0.001,0.050,0,GNBLOCK),COLORCYAN;{概念}; 

    DRAWTEXT_FIX(ISLASTBAR,0.002,0.1,0,ZDBLOCK); 

    {做记号} 

    CM:=REF(C,1); 

    涨停:=IF((C-CM)*100/CM =9.9,1,0); 

    STICKLINE(涨停,OPEN,CLOSE,3.8,0),COLORMAGENTA; 

    STICKLINE(涨停,H,L,0,0),COLORLIRED; 

    {跌停做记号} 

    跌停:=IF((C-CM)*100/CM =-9.9,1,0); 

    STICKLINE(跌停,OPEN,CLOSE,3.8,0),COLORGREEN; 

    STICKLINE(跌停,H,L,0,0),COLORGREEN; 

    通线17:MA(C,17),LINETHICK1,COLORMAGENTA; 

    ⼦线26:MA(C,26),LINETHICK1,COLORLIBLUE; 

    午线100:MA(C,100),LINETHICK1,COLORRED; 

    ⾠线145:MA(C,145),LINETHICK1,COLORYELLOW; 

    年线250:MA(C,250),DOTLINE,LINETHICK1,COLORLIRED; 

    申线320:MA(C,320),LINETHICK1,COLORWHITE; 

    卯线455:MA(C,455),LINETHICK1,COLORGREEN; 

    亥线732:MA(C,732),LINETHICK1,COLORBLUE; 

    AA1:=AMOUNT/V; 

    BB1:=L AA1*0.9; 

    CC1:=(C-REF(C,1))/REF(C,1)*100  

    DD1:=L MA(C,5)*0.921; 

    EE1:=V MA(V,5)*1.5; 

    FF1:=BB1ANDCC1ANDDD1ANDEE1; 

    DRAWTEXT(FF1,LOW*0.96, ★⽼⿏仓 ),COLORYELLOW; 

    (注:怎样把由实线改为虚线? 

    公式源码稍微修改⼀下,可能各交易软件不⼀样。通达信的,加函数,dotline;即可例如MA2 

    0:MA(CLOSE,20),DOTLINE;) 

    1、⼦线:26天线,孕育之线,短期线,2、午线:100天线,蓬勃之线,短期趋势线,3、 

    ⾠线:145天线,⽣命之线,中期趋势线,4、卯线:455天线,希望之线,中期趋势线,4、申 

    线:320天线,命运之线,长期趋势线,5、亥线:732天线,成功之线,长期趋势线,6、通线 

    :17天线,临界之线,短期⽜熊分界, 

    (⼦穿午线,⼤⽜初现,⼦破午线,⼤熊初现。) 

    通⼦⾦叉和通⼦死叉⼝诀:通⼦⾦叉,强;通⼦死叉,先观望。 

    ⼤道通⼦线关系是:⾦叉,意味着机会显现;死叉,意味着机会渺茫。 

    周线设置:⼤道七线 

    周三号线32:MA(C,32),LINETHICK1,COLORGREEN; 

    周九号线90:MA(C,90),LINETHICK1,COLORWHITE; 

    周⼀号线180:MA(C,180),LINETHICK1,COLORMAGENTA; 

    周⼆号线270:MA(C,270),LINETHICK1,COLORLIRED; 

    周七号线710:MA(C,710),LINETHICK1,COLORCYAN; 

    32周线(三号线,最赚钱的线,线上赚,跌破宣告熊市来临,操作看3号线,跌破出,站稳 

    进。)90周线(九号线),周九号线站稳,中⼤胆进场!180周线(⼀号线);270周线( 

    ⼆号线);710周线(七号线),周七号线是长期最后⼀道⽀撑,跌到底了,底就产⽣了,沪指 

    从6124跌到1664正是周七号线。 

    ⽉线设置:⼤道七线 

    ⽉⼆号线21:MA(C,21),LINETHICK1,COLORGREEN; 

    ⽉四号线41:MA(C,41),LINETHICK1,COLORWHITE; 

    ⽉六号线61:MA(C,61),LINETHICK1,COLORMAGENTA; 

    ⽉⼋号线81:MA(C,81),LINETHICK1,COLORLIRED; 

    ⽉⼀号线101:MA(C,101),LINETHICK1,COLORCYAN; 

    21⽉线(⼆号线),41⽉线(四号线),61⽉线(六号线),81⽉线(⼋号线),101⽉线( 

    ⼀号线)。 

    分时设置(5,15,30,60分钟):⼤道七线 

    全线19:MA(C,19),LINETHICK1,COLORYELLOW; 

    三号线31:MA(C,31),LINETHICK1,COLORGREEN; 

    五号线56:MA(C,56),LINETHICK1,COLORWHITE; 

    ⼀号线105:MA(C,105),LINETHICK1,COLORMAGENTA; 

    四号线455:MA(C,455),LINETHICK1,COLORLIRED; 

    ⼋号线890:MA(C,890),LINETHICK1,COLORCYAN; 

    总手:VOL,NODRAW; 

    ZZ:=IF(REF(C,1) REF(O,1)ANDO REF(C,1)*1.014ANDC O*1.02,1,3); 

    V5:=MA(V,5); 

    V12:=MA(V,12); 

    V34:=MA(V,34); 

    C6:=MA(C,6); 

    STICKLINE(VOL,0,VOL,1,0),COLORLIGRAY; 

    STICKLINE(CROSS(C,C6)ANDV V5*1.2ANDV V12*1.2ANDZZ 2AND 

    C H*0.975,0,VOL,1,0),COLORRED; 

    STICKLINE(CROSS(C6,C)ANDV V5*1.2ANDV V12*1.2,0,VOL,1,0),COLORGREEN; 

    STICKLINE(VOL MA(VOL,5)*2ANDV V34*3AND 

    C REF(C,1)*1.05,0,VOL,1,0),COLORYELLOW; 

    AR1:=MA(CLOSE,1); 

    VAR2:=MA(CLOSE,3); 

    VAR3:MA(VAR2,1); 

    VAR4:MA(VAR2,3); 

    STICKLINE(VAR3 VAR4,VAR3,VAR4,2,0),LINETHICK1,COLORFF00FF; 

    STICKLINE(VAR3 VAR4,VAR3,VAR4,2,0),LINETHICK1,COLOR00FF00; 

    A:=IF(CLOSE =OPEN,(CLOSE-OPEN)/4,0); 

    CBFB:=MA(C,2); 

    JL:=IF(C CBFB,V,0); 

    CL:=IF(C CBFB,V,0); 

    JLH:=SUM(JL,4); 

    CLH:=SUM(CL,4); 

    LHB:=CLH/JLH; 

    :IF(HHV(LHB,5) 4ANDCROSS(2,LHB)ANDC =O,1,0); 

    DRAWICON(私募,L*0.96,9); 

    STICKLINE(VOL MA(VOL,5)/2ANDV V12/2,0,VOL,1,0),COLORBLUE; 

    STICKLINE(VOL MA(VOL,5)*2ANDV V34*3ANDC REF(C,1)*1.05ANDCROSS(C,C6) 

    ANDV V5*1.2ANDV V12*1.2ANDZZ 2ANDC H*0.975,VOL*0.5,0,1,0),COLORRED; 

    STICKLINE(VOL MA(VOL,5)*2ANDV V34*3ANDC REF(C,1)*1.05ANDCROSS(C6,C) 

    ANDV V5*1.2ANDV V12*1.2,VOL*0.5,0,1,0),COLORRED; 

    */ 

    MA1:MA(CLOSE,5); 

    MA2:MA(CLOSE,10); 

    MA3:MA(CLOSE,20); 

    MA4:MA(CLOSE,30); 

    MA5:MA(CLOSE,50); 

    MA6:MA(CLOSE,60); 

    MAXMA:MAX1(MA1,MA2,MA3,MA4,MA5,MA6); 

    MINMA:MIN1(MA1,MA2,MA3,MA4,MA5,MA6); 

    DRAWCOLORKLINE(C MAXMA ISDOWN,COLORMAGENTA,0); 

    DRAWCOLORKLINE(C MINMA ISDOWN,COLORGREEN,0); 

    DRAWCOLORKLINE(C MAXMA ISUP,COLORMAGENTA,1); 

    DRAWCOLORKLINE(C MINMA ISUP,COLORGREEN,1);


    image.png

    九毛八公式指标,一个优质的公式指标平台!
    九毛八公式指标 » 五彩k线主图指标公式(通达信k线主图公式) 加入收藏