通达信多头移仓副图指标公式
安装后如下图,友情提示(指标只是辅助,不作建议) 所有程序均为免费分享。
不会安装点击 安装指南 步骤操作。
MTR:=EMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),14);
HD :=HIGH-REF(HIGH,1);
LD :=REF(LOW,1)-LOW;
DMP:=EMA(IF(HD > 0 && HD > LD,HD,0),14);
DMM:=EMA(IF(LD > 0 && LD > HD,LD,0),14);
PDI:=DMP/MTR;
MDI:=DMM/MTR{需要编写选股关注微信公众号:程序化指标};
ADX:=MA(ABS(MDI-PDI)/(MDI+PDI),6);
MTRB:=MAX(MAX((HIGH-LOW),ABS(REF(CLOSE,1)-HIGH)),ABS(REF(CLOSE,1)-LOW));
ATRA:=(EMA(MTRB,14)/C*500)*ADX+1,NODRAW;
VAR1:=REF((LOW+OPEN+CLOSE+HIGH)/4,1);
VAR21:=SMA(ABS(HIGH-VAR1),12,1)/SMA(MIN(HIGH-VAR1,0),12,1);
VAR31:=EMA(VAR21,120/ATRA);
VAR41:=HHV(HIGH,120/ATRA);
VAR51:=-EMA(IF(HIGH >=VAR41,VAR31,0),3);
拉高:=IF(VAR51 > REF(VAR51,1),IF(VAR51 > 50,50,VAR51),0),COLORRED,NODRAW;
派发:=IF(VAR51 < REF(VAR51,1),IF(VAR51 > 50,50,VAR51),0),COLORCYAN,NODRAW;
VAR2:=SMA(ABS(LOW-VAR1),12,1)/SMA(MAX(LOW-VAR1,0),12,1);
VAR3:=EMA(VAR2,120/ATRA);
VAR4:=LLV(LOW,120/ATRA);
VAR5:=-EMA(IF(LOW <=VAR4,VAR3,0),3);
出货:=IF(VAR5 < REF(VAR5,1),IF(VAR5 < -50,-50,VAR5),0),COLORGREEN,NODRAW;
进场:=IF(VAR5 > REF(VAR5,1),IF(VAR5 < -50,-50,VAR5),0),COLORLIRED,NODRAW;
DIF:=(EMA(CLOSE,12/ATRA)-EMA(CLOSE,26/ATRA))/C*1000;
DEA:=EMA(DIF,9/ATRA);
MACD:=(DIF-DEA)*5,COLORSTICK;
MACD仓:INTPART(DIF/10)*10+20,COLORGRAY,LINETHICK3;
M仓资金:=MACD仓*1.5,COLORGRAY,NODRAW;
HH:=REF(HHV(H,15),1);
LL:=REF(LLV(L,15),1);
CC:=C;
UP:=BARSLAST(CC < LL);
DN:=BARSLAST(CC > HH);
PDIA:=INTPART((100-DMP*100/MTR)/10)*10;
多头仓位:=(100-INTPART(SMA(((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100),3,1)/10)*10),COLORLIRED,LINETHICK1;
空头仓位:=(100-INTPART(SMA(((HHV(H,27)-C)/(HHV(HIGH,27)-LLV(LOW,27))*100),3,1)/10)*10),COLORLIBLUE,LINETHICK1;
多头:=IF(UP > DN,多头仓位+50,多头仓位-20)+(INTPART((拉高+派发)/10)*20);
空头:=IF(UP > DN,空头仓位-20,空头仓位-20)+(INTPART((出货+进场)/10)*20);
多头移动仓:IF(多头仓位 < 空头仓位,INTPART(EMA((多头+MACD仓)/2,3)/10)*10+MACD仓,INTPART(EMA((空头+MACD仓)/2,3)/10)*10),COLORLIRED;
实时仓:IF(多头仓位 < 空头仓位,INTPART(EMA((多头+MACD仓+PDIA)/3,3)/10)*10,INTPART(EMA((空头+MACD仓+PDIA)/3,3)/10)*10),COLORLIBLUE;
影子:=IF(多头移动仓 >=50,IF((100-多头移动仓)+50 > 50,100-多头移动仓+50,50),IF(实时仓 < 50,实时仓,(100-多头移动仓)+50)),COLORWHITE;
冲高仓:=50,COLORYELLOW,NODRAW;
满仓:=100,COLORBLUE,DOTLINE;
实仓资金:实时仓*1.5,COLORLIBLUE,NODRAW;
多仓资金:多头移动仓*1.5,COLORLIRED,NODRAW;
影子仓:IF(影子 > 实时仓,影子,实时仓),COLORBROWN;
影子仓资金:影子仓*1.5,COLORBROWN,NODRAW;
平衡仓:INTPART((实时仓+多头移动仓+影子仓)/3/10)*10,COLORWHITE;
平衡仓资金:平衡仓*1.5,COLORWHITE,NODRAW;
IF(平衡仓 >=50,平衡仓,DRAWNULL),COLORRED,LINETHICK3;
IF(平衡仓 < 50,平衡仓,DRAWNULL),COLORGREEN,LINETHICK3;
DRAWNUMBER(CURRBARSCOUNT=1,实时仓,实时仓),COLORLIBLUE;
DRAWNUMBER(CURRBARSCOUNT=1,多头移动仓,多头移动仓),COLORLIRED;
DRAWNUMBER(CURRBARSCOUNT=1,影子仓,影子仓),COLORBROWN;
DRAWNUMBER(CURRBARSCOUNT=1,平衡仓,平衡仓),COLORWHITE;
IF(MA(C,5) < MA(C,60),MACD仓,DRAWNULL),COLORGREEN,LINETHICK3;
IF(MA(C,5) > MA(C,10) AND MA(C,10) > MA(C,20) AND MA(C,20) > MA(C,60),MACD仓,DRAWNULL),COLORRED,LINETHICK3;
STICKLINE(实时仓-多头移动仓 >=20,100,90,2,1),COLORLIBLUE;
STICKLINE(多头移动仓-实时仓 >=0,100,90,2,1),COLORLIRED;
STICKLINE(多头移动仓 >=影子仓,100,95,2,0),COLORYELLOW;
STICKLINE(多头移动仓 < 影子仓,90,95,2,1),COLORWHITE;
DRAWICON(CROSS(99,多头移动仓),100,2);
版权声明
所有指标均为免费分享。
文章内容来自互联网,本网站无任何收费项目也不推荐股票广告投放请自行识别风险。