通达信多空转换简版主图指标公式源码

[复制链接]
查看267 | 回复0 | 2021-8-28 02:09:01 | 显示全部楼层 |阅读模式

以下是通达信多空转换简版主图指标公式源码(无源码的请下载附件导入)

{月涨跌}
月O:=O#MONTH,NODRAW;
月C:=C#MONTH,NODRAW;
月H:=H#MONTH,NODRAW;
月L:=L#MONTH,NODRAW;

 STICKLINE(月C>=月O,月L,月H,5,0),COLORBROWN;{月涨}
STICKLINE(月C<=月O,月L,月H,5,0),COLORGRAY;{月跌}
 {STICKLINE(月C>=月O,月O,月C,5,0),COLORLIRED;}{月涨}
 {STICKLINE(月C<月O,月O,月C,5,0),COLORLIGREEN;}{月跌};

月开盘价:CONST(O#MONTH),LINETHICK3;

获利盘001%:=REFDATE(CONST(COST(0.001)),DATE),LINETHICK6,COLORYELLOW;
获利盘01%:=REFDATE(CONST(COST(0.01)),DATE),LINETHICK6,COLORYELLOW;
 DRAWBAND(获利盘001%,RGB(250,150,50),获利盘01%,RGB(250,150,50));

获利盘49%:=REFDATE(CONST(COST(49)),DATE),LINETHICK6,COLORYELLOW;
获利盘51%:=REFDATE(CONST(COST(51)),DATE),LINETHICK6,COLORYELLOW;
 DRAWBAND(获利盘49%,RGB(250,150,50),获利盘51%,RGB(250,150,50));

获利盘99.9%:=REFDATE(CONST(COST(99.9)),DATE),LINETHICK6,COLORYELLOW;
获利盘99.99%:=REFDATE(CONST(COST(99.999)),DATE),LINETHICK6,COLORYELLOW;
 DRAWBAND(获利盘99.9%,RGB(250,150,50),获利盘99.99%,RGB(250,150,50));


当期开盘:DOPEN,NODRAW,COLORRED;
当期收盘:DCLOSE,NODRAW,COLORYELLOW;
当期最高:DHIGH,NODRAW,COLORMAGENTA;
当期最低:DLOW,NODRAW,COLORWHITE;

当期上影:DHIGH-MAX(DOPEN,DCLOSE),NODRAW,COLORMAGENTA;
当期下影:MIN(DOPEN,DCLOSE)-DLOW,NODRAW,COLORGREEN;
当期实体:ABS(DCLOSE-DOPEN),NODRAW,COLORRED;
当期涨幅:(DCLOSE-DOPEN)/DOPEN*100,NODRAW,COLORWHITE;
当期波幅:(DHIGH-DLOW)/DLOW*100,NODRAW,COLORMAGENTA;

 STICKLINE(DOPEN<DCLOSE,DHIGH,DLOW,4,0),COLOR33BBBB;
 STICKLINE(DOPEN<DCLOSE,DOPEN,DCLOSE,4,0),COLOR8833CC;
 STICKLINE(DOPEN>DCLOSE,DHIGH,DLOW,4,0),COLORAA3333;
 STICKLINE(DOPEN>DCLOSE,DOPEN,DCLOSE,4,0),COLOR668833;


涨跌周期:BARSLAST(O=DOPEN AND DVOL!=REF(DVOL,1))+1,NODRAW,COLORRED;
 DRAWNUMBER(REFX(涨跌周期,1)<=涨跌周期 OR ISLASTBAR ,DHIGH,涨跌周期);
DRAWTEXT_FIX(1,0.991,0.881,1,STRCAT('涨跌周期:',CON2STR(涨跌周期,2))),COLORGRAY;


 {画K线}
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);

1921244737.jpg

1921244737.jpg

回复

使用道具 举报

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

本版积分规则