通达信更好盈利副图源码

[复制链接]
查看101 | 回复0 | 2021-8-26 22:35:12 | 显示全部楼层 |阅读模式

以下是通达信更好盈利副图源码(无源码的请下载附件导入)

均价:=(L+H+C*2)/4;
 EMA14:=EMA(均价,14)COLORYELLOW,LINETHICK2;
涨跌率:(EMA14-REF(EMA14,1))/REF(EMA14,1)*100,,COLORWHITE,NODRAW;
上涨周期:=BARSLAST(CROSS(涨跌率,0));
收盘价:C,NODRAW;
买入止损:REF(均价,上涨周期),COLORGREEN,NODRAW;
买入:CROSS(C,买入止损),COLORRED,NODRAW;
 STICKLINE(涨跌率>0,0,涨跌率*10,0.1,0),COLORRED;
 STICKLINE(涨跌率<0,0,涨跌率*10,0.1,0),COLORCYAN;
 STICKLINE(涨跌率>0 AND 涨跌率<REF(涨跌率,1),0,涨跌率*10,0.1,0),COLORLIGREEN;
 STICKLINE(涨跌率<0 AND 涨跌率>REF(涨跌率,1),0,涨跌率*10,0.1,0),COLORLIRED;
 MA5:=MA(C,6);
盈利:(均价-买入止损)/买入止损*100,,COLORYELLOW,LINETHICK2;
乖离:(均价-MA5)/MA5*100,COLORMAGENTA,LINETHICK2;
乖离均:MA(乖离,3)COLORGREEN,DOTLINE;
 0,COLORGRAY,DOTLINE;
 DRAWICON(买入=1,-1,1);
持股:IF(涨跌率>=0 {AND 涨跌率>REF(涨跌率,1)},0,DRAWNULL),COLORRED,LINETHICK1;

840233195.jpg

840233195.jpg

回复

使用道具 举报

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

本版积分规则