进出有度自编通达信主图
O1:=(SUM(EMA((CLOSE+LOW)/2,1)/3,3)),COLOR00FFFF,LINETHICK1;O2:=EMA(O1,3),COLORFF00FF,LINETHICK1;O3:=EMA(O2,3),COLOR00FF00,LINETHICK1;MMM:MA(CLOSE,20),LINETHICK2,COLOR00FF00;IF(MMM>REF(MMM,1),MMM,DRAWNULL)COLORRED,LINETHICK2;IF(MMM<REF(MMM,1),MMM,DRAWNULL)COLOR00FF00,LINETHICK2;VAR1:=CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2);VAR2:=REF(VAR1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);VAR3:=REF(VAR2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);VAR4:=REF(VAR3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);VAR5:=REF(VAR4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);VAR6:=REF(VAR5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);VAR7:=REF(VAR6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);VAR8:=REF(VAR7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);VAR9:=REF(VAR8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);VARA:=REF(VAR9,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);VARB:=REF(VARA,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);VARC:=REF(VARB,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);X3:=EMA(CLOSE,30);STICKLINE(((C >= X3) AND (C >= O)),H,L,0,1),COLOR0000AA;STICKLINE(((C >= X3) AND (C >= O)),O,C,3,0),COLOR0000AA;STICKLINE(((C >= X3) AND (C >= O)),O,C,2.3,0),COLOR0000CC;STICKLINE(((C >= X3) AND (C >= O)),O,C,1.8,0),COLOR0000FF;STICKLINE(((C >= X3) AND (C >= O)),O,C,0.1,0),COLORCC66FF;
STICKLINE(((C >= X3) AND (C <= O)),H,L,0,1),COLOR0000AA;STICKLINE(((C >= X3) AND (C <= O)),O,C,3,0),COLOR0000AA;STICKLINE(((C >= X3) AND (C <= O)),O,C,2.3,0),COLOR0000CC;STICKLINE(((C >= X3) AND (C <= O)),O,C,1.8,0),COLOR0000FF;STICKLINE(((C >= X3) AND (C <= O)),O,C,0.1,0),COLORCC66FF;
STICKLINE(((C <= X3) AND (C >= O)),H,L,0,1),COLORFF6600;STICKLINE(((C <= X3) AND (C >= O)),O,C,3,0),COLORFF6600;STICKLINE(((C <= X3) AND (C >= O)),O,C,2.3,0),COLORFF9900;STICKLINE(((C <= X3) AND (C >= O)),O,C,1.8,0),COLORFFCC00;STICKLINE(((C <= X3) AND (C >= O)),O,C,0.1,0),COLORFFFF00;
STICKLINE(((C <= X3) AND (C <= O)),H,L,0,0),COLORFF6600;STICKLINE(((C <= X3) AND (C <= O)),O,C,3,0),COLORFF6600;STICKLINE(((C <= X3) AND (C <= O)),O,C,2.3,0),COLORFF9900;STICKLINE(((C <= X3) AND (C <= O)),O,C,1.8,0),COLORFFCC00;STICKLINE(((C <= X3) AND (C <= O)),O,C,0.1,0),COLORFFFF00;
VARD:=CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2);VARE:=REF(VARD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2),COLOR0000AA;VARF:=REF(VARE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2),COLORRED;VAR10:=REF(VARF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2),COLOR0000AA;VAR11:=REF(VAR10,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2),COLOR0000CC;VAR12:=REF(VAR11,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2),COLOR0000FF;VAR13:=REF(VAR12,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2),COLORFF0000;VAR14:=REF(VAR13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2),COLOR0000FF;VAR15:=REF(VAR14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2),COLORFF0000;VAR16:=REF(VAR15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2),COLOR0000FF;VAR17:=REF(VAR16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2),COLORFF3333;VAR18:=REF(VAR17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2),COLOR0000FF;VAR19:=REF(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 ORVAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18,1) AND VAR1;VAR1A:=REF(VAR1 OR VAR2 OR VAR3 OR VAR4 OR VAR5 OR VAR6 OR VAR7 ORVAR8 OR VAR9 OR VARA OR VARB OR VARC,1) AND VARD;DRAWTEXT(FILTER(VAR19=1,5),LOW*0.99,'进'),COLORFF00FF;DRAWICON(FILTER(VAR19=1,5),LOW*0.992,9);STICKLINE(FILTER(VAR19=1,5),O,C,3,0),COLORYELLOW;
DRAWTEXT(FILTER(VAR1A=1,5),HIGH*1.01,'出'),COLOR00FF00;DRAWICON(FILTER(VAR1A=1,5),HIGH*1.005,15);STICKLINE(FILTER(VAR1A=1,5),O,C,3,0),COLORGREEN;
来函数检测结果如下:
该公式没有未来函数
解密、定制、编写股票指标请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
O1赋值:(SUM(EMA((收盘价+最低价)/2,1)/3,3)),COLOR00FFFF,LINETHICK1
O2赋值:O1的3日指数移动平均,COLORFF00FF,LINETHICK1
O3赋值:O2的3日指数移动平均,COLOR00FF00,LINETHICK1
输出MMM:收盘价的20日简单移动平均, 线宽为2,COLOR00FF00
IF(MMM>1日前的MMM,MMM,DRAWNULL)画红色, 线宽为2
IF(MMM<1日前的MMM,MMM,DRAWNULL)COLOR00FF00, 线宽为2
VAR1赋值:收盘价>1日前的收盘价 AND 收盘价>2日前的收盘价
VAR2赋值:1日前的VAR1 AND 收盘价<=1日前的收盘价 AND 收盘价>=2日前的收盘价
VAR3赋值:1日前的VAR2 AND 收盘价>=1日前的收盘价 AND 收盘价<=2日前的收盘价
VAR4赋值:1日前的VAR3 AND 收盘价<=1日前的收盘价 AND 收盘价>=2日前的收盘价
VAR5赋值:1日前的VAR4 AND 收盘价>=1日前的收盘价 AND 收盘价<=2日前的收盘价
VAR6赋值:1日前的VAR5 AND 收盘价<=1日前的收盘价 AND 收盘价>=2日前的收盘价
VAR7赋值:1日前的VAR6 AND 收盘价>=1日前的收盘价 AND 收盘价<=2日前的收盘价
VAR8赋值:1日前的VAR7 AND 收盘价<=1日前的收盘价 AND 收盘价>=2日前的收盘价
VAR9赋值:1日前的VAR8 AND 收盘价>=1日前的收盘价 AND 收盘价<=2日前的收盘价
VARA赋值:1日前的VAR9 AND 收盘价<=1日前的收盘价 AND 收盘价>=2日前的收盘价
VARB赋值:1日前的VARA AND 收盘价>=1日前的收盘价 AND 收盘价<=2日前的收盘价
VARC赋值:1日前的VARB AND 收盘价<=1日前的收盘价 AND 收盘价>=2日前的收盘价
X3赋值:收盘价的30日指数移动平均
STICKLINE(((C >= X3) AND (C >= O)),H,L,0,1),COLOR0000AA
STICKLINE(((C >= X3) AND (C >= O)),O,C,3,0),COLOR0000AA
STICKLINE(((C >= X3) AND (C >= O)),O,C,2.3,0),COLOR0000CC
STICKLINE(((C >= X3) AND (C >= O)),O,C,1.8,0),COLOR0000FF
STICKLINE(((C >= X3) AND (C >= O)),O,C,0.1,0),COLORCC66FF
STICKLINE(((C >= X3) AND (C <= O)),H,L,0,1),COLOR0000AA
STICKLINE(((C >= X3) AND (C <= O)),O,C,3,0),COLOR0000AA
STICKLINE(((C >= X3) AND (C <= O)),O,C,2.3,0),COLOR0000CC
STICKLINE(((C >= X3) AND (C <= O)),O,C,1.8,0),COLOR0000FF
STICKLINE(((C >= X3) AND (C <= O)),O,C,0.1,0),COLORCC66FF
STICKLINE(((C <= X3) AND (C >= O)),H,L,0,1),COLORFF6600
STICKLINE(((C <= X3) AND (C >= O)),O,C,3,0),COLORFF6600
STICKLINE(((C <= X3) AND (C >= O)),O,C,2.3,0),COLORFF9900
STICKLINE(((C <= X3) AND (C >= O)),O,C,1.8,0),COLORFFCC00
STICKLINE(((C <= X3) AND (C >= O)),O,C,0.1,0),COLORFFFF00
STICKLINE(((C <= X3) AND (C <= O)),H,L,0,0),COLORFF6600
STICKLINE(((C <= X3) AND (C <= O)),O,C,3,0),COLORFF6600
STICKLINE(((C <= X3) AND (C <= O)),O,C,2.3,0),COLORFF9900
STICKLINE(((C <= X3) AND (C <= O)),O,C,1.8,0),COLORFFCC00
STICKLINE(((C <= X3) AND (C <= O)),O,C,0.1,0),COLORFFFF00
VARD赋值:收盘价<1日前的收盘价 AND 收盘价<2日前的收盘价
VARE赋值:1日前的VARD AND 收盘价>=1日前的收盘价 AND 收盘价<=2日前的收盘价,COLOR0000AA
VARF赋值:1日前的VARE AND 收盘价<=1日前的收盘价 AND 收盘价>=2日前的收盘价,画红色
VAR10:=1日前的VARF AND 收盘价>=1日前的收盘价 AND 收盘价<=2日前的收盘价,COLOR0000AA
VAR11:=1日前的VAR10 AND 收盘价<=1日前的收盘价 AND 收盘价>=2日前的收盘价,COLOR0000CC
VAR12:=1日前的VAR11 AND 收盘价>=1日前的收盘价 AND 收盘价<=2日前的收盘价,COLOR0000FF
VAR13:=1日前的VAR12 AND 收盘价<=1日前的收盘价 AND 收盘价>=2日前的收盘价,COLORFF0000
VAR14:=1日前的VAR13 AND 收盘价>=1日前的收盘价 AND 收盘价<=2日前的收盘价,COLOR0000FF
VAR15:=1日前的VAR14 AND 收盘价<=1日前的收盘价 AND 收盘价>=2日前的收盘价,COLORFF0000
VAR16:=1日前的VAR15 AND 收盘价>=1日前的收盘价 AND 收盘价<=2日前的收盘价,COLOR0000FF
VAR17:=1日前的VAR16 AND 收盘价<=1日前的收盘价 AND 收盘价>=2日前的收盘价,COLORFF3333
VAR18:=1日前的VAR17 AND 收盘价>=1日前的收盘价 AND 收盘价<=2日前的收盘价,COLOR0000FF
VAR19:=1日前的VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 ORVAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18 AND VAR1
VAR1A:=1日前的VAR1 OR VAR2 OR VAR3 OR VAR4 OR VAR5 OR VAR6 OR VAR7 ORVAR8 OR VAR9 OR VARA OR VARB OR VARC AND VARD
DRAWTEXT(VAR19=1的5过滤,最低价*0.99,'进'),COLORFF00FF
DRAWICON(VAR19=1的5过滤,最低价*0.992,9)
STICKLINE(VAR19=1的5过滤,O,C,3,0),画黄色
DRAWTEXT(VAR1A=1的5过滤,最高价*1.01,'出'),COLOR00FF00
DRAWICON(VAR1A=1的5过滤,最高价*1.005,15)
STICKLINE(VAR1A=1的5过滤,O,C,3,0),画绿色