通达信盈利统计指标公式

选股条件:=crOSS(MA(C,10),MA(C,20));
赢利系数:10,NODRAW;
止损系数:10,NODRAW;
待仓天数:20,NODRAW;
买点:=选股条件,COLORYELLOW;
买距:=BArslAST(买点),NODRAW;
MM:=买距>0;
买价:=REF(C,买距)*MM,COLORYELLOW;
止赢价:=买价*(100+赢利系数)/100;
止损价:=买价*(100-止损系数)/100;
预卖:=H>止赢价 OR C<止损价 OR 买距=待仓天数 ;
预卖距:=BARSLAST(预卖),NODRAW;
盈利:= H>止赢价 AND REF(预卖距>=买距,1),COLORRED ,LINETHICK1;
亏损:=C<止损价 AND REF(预卖距>=买距,1),COLORGREEN ,LINETHICK1;
平仓:= 买距=待仓天数 AND REF(预卖距>=买距,1) ,LINETHICK1 ;
盈平仓:=平仓=1 AND C>买价,NODRAW;
亏平仓:=平仓=1 AND C<买价,NODRAW;
买统计:CONST(COUNT(买点,BARSCOUNT(买点))), COLORYELLOW,NODRAW;
盈统计:CONST(COUNT(盈利,BARSCOUNT(盈利))) ,COLORRED,NODRAW;
亏统计:CONST(COUNT(亏损,BARSCOUNT(亏损))) ,COLORGREEN,NODRAW;
平仓统计:CONST(COUNT(平仓,BARSCOUNT(平仓))),COLORWHITE,NODRAW;
盈平仓统计:CONST(COUNT(盈平仓,BARSCOUNT(盈平仓))) ,COLORRED, LINETHICK1,NODRAW;
亏平仓统计:CONST(COUNT(亏平仓,BARSCOUNT(亏平仓))) ,COLORGREEN, LINETHICK1,NODRAW;
选股次数:买统计 ,COLORRED, LINETHICK1,NODRAW;
成功次数:盈平仓统计+ 盈统计 ,COLORRED, LINETHICK1,NODRAW;
成功率:(成功次数/买统计)*100, ,COLORRED, LINETHICK1,NODRAW;
DRAWICON(买点=1,5,1);
STICKLINE(买点,7,50,1,0),COLORYELLOW,LINETHICK1;
STICKLINE(盈利,25,50,1,0),COLORRED,LINETHICK1;
STICKLINE(亏损,30,50,1,0),COLORGREEN,LINETHICK1;
STICKLINE(平仓,7,40,1,0),COLORWHITE,LINETHICK1;
TDXSTEP101:DRAWTEXT(买点,30,'←买'),COLORYELLOW;
TDXSTEP102:DRAWTEXT(盈利,35,'←盈'),COLORRED;
TDXSTEP103:DRAWTEXT(亏损,15,'←亏'),COLORGREEN;
TDXSTEP104:DRAWTEXT(盈平仓,25,'←盈平'),COLORWHITE;
TDXSTEP105:DRAWTEXT(亏平仓,20,'←亏平'),COLORWHITE;




来函数检测结果如下:
该公式没有未来函数

解密、定制、编写股票指标请联系QQ或微信同号:88652583
相关股票指标公式

联系我们  |  股票指标网  |  指标网   |  指标公式  |   加入收藏   |  设为主页

@2005-2023 粤ICP备2023063687号-2 股票指标网别名指标网仅为互联网文章,所有股票指标公式及文章仅供学习研究,并不构成投资建议,请勿以此为依据进行股票交易,由此引起的投资亏损与本站无关。股票指标网均来源互联网收集整理,如不慎侵犯了你的权益,请联系我们告知,我们将做删除处理
QQ:88652583 微信 88652583
sitemap站点地图