超級強大的均线主图指标 通达信公式(附图)

[复制链接]
查看97 | 回复0 | 2021-8-20 15:57:37 | 显示全部楼层 |阅读模式

M1:=5;
T1:=0;
XX1:=0;
P1:=0;
M2:=0;
T2:=0;
XX2:=0;
P2:=0;
M3:=5;
T3:=0;
XX3:=0;
P3:=0;
M4:=5;
T4:=0;
XX4:=0;
P4:=0;
PK1:=IF(XX1=0,C,IF(XX1=1,H,IF(XX1=2,L,IF(XX1=3,O,IF(XX1=4,(H+L)/2,IF(XX1=5,(C+H+L)/3,(C+H+L+O)/4))))));
MA1: IF(T1>0,REF(MA(PK1,M1),T1),MA(PK1,M1))*(1+P1/100);
PK2:=IF(XX2=0,C,IF(XX2=1,H,IF(XX2=2,L,IF(XX2=3,O,IF(XX2=4,(H+L)/2,IF(XX2=5,(C+H+L)/3,(C+H+L+O)/4))))));
MA2: IF(T2>0,REF(MA(PK2,M2),T2),MA(PK2,M2))*(1-P2/100);
PK3:=IF(XX3=0,C,IF(XX3=1,H,IF(XX3=2,L,IF(XX3=3,O,IF(XX3=4,(H+L)/2,IF(XX3=5,(C+H+L)/3,(C+H+L+O)/4))))));
MA3: IF(T3>0,REF(MA(PK3,M3),T3),MA(PK3,M3))*(1+P3/100);
PK4:=IF(XX4=0,C,IF(XX4=1,H,IF(XX4=2,L,IF(XX4=3,O,IF(XX4=4,(H+L)/2,IF(XX4=5,(C+H+L)/3,(C+H+L+O)/4))))));
MA4: IF(T4>0,REF(MA(PK4,M4),T4),MA(PK4,M4))*(1-P4/100);
MD: MA(CLOSE,20),COLORLICYAN,NODRAW;
UP: MD + 2*STD(CLOSE,20),COLORRED,NODRAW;
DN: MD - 2*STD(CLOSE,20),COLORLIMAGENTA,NODRAW;
NOTEXT2:IF(P4=0.01,UP,DRAWNULL),COLORGRAY;
NOTEXT3:IF(P4=0.01,DN,DRAWNULL),COLORGRAY;

1493a2B61F-2ON.jpg

1493a2B61F-2ON.jpg

 

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则