您现在的位置:  股票知识 > 股票公式 > 通达信股票公式 > 正文
南财搜索

通达信最后的赢亏指标公式

2014-02-10 14:16    股票知识   zhishi.southmoney.com
    

  赢利系数:=10;

  止损系数:=10;

  待仓天数:=5;

  VAR1:=100*EMA(EMA((C-REF(C,1)),6),6)/EMA(EMA(ABS((C-REF(C,1))),6),6);

  买点:=FILTER(LLV(VAR1,2)=LLV(VAR1,7) AND COUNT(VAR1《0,2) AND CROSS(VAR1,MA(VAR1,2)),5),COLORYELLOW;

  买距:=BARSLAST(买点),NODRAW;

  MM:=买距》0;

  买价:REF(C,买距)*MM,COLORWHITE,NODRAW;

  止赢价:买价*(100+赢利系数)/100,NODRAW;

  止损价:买价*(100-止损系数)/100,NODRAW;

  预卖:=(H》止赢价 OR C《止损价 OR 买距=待仓天数)AND 买点=0 ;

  预卖距:=BARSLAST(预卖),NODRAW;

  盈利:=预卖=1 AND H》止赢价 AND REF(预卖距》买距,1),COLORRED;

  亏损:=预卖=1 AND C《止损价 AND REF(预卖距》买距,1),COLORGREEN;

  平仓:=预卖=1 AND 买距=待仓天数 AND REF(预卖距》买距,1) AND 盈利!=1 AND 亏损!=1,COLORGREEN;

  盈平仓:=平仓=1 AND C》买价,NODRAW;

  买统计:=CONST(COUNT(买点,BARSCOUNT(买点))),NODRAW;

  盈统计:=CONST(COUNT(盈利,BARSCOUNT(盈利))),NODRAW;

  平仓统计:=CONST(COUNT(平仓,BARSCOUNT(平仓))),NODRAW;

  盈平仓统计:=CONST(COUNT(盈平仓,BARSCOUNT(盈平仓))),NODRAW;

  DRAWICON(买点=1,6,25);

  STICKLINE(盈利,0,40,1,0),COLORMAGENTA;

  DRAWTEXT(盈利,42,‘盈利啦!’),COLORMAGENTA;

  STICKLINE(亏损,0,30,1,0),COLORGREEN;

  DRAWTEXT(亏损,32,‘亏了呗!’),COLORGREEN;

  STICKLINE(平仓,0,20,1,0),COLORYELLOW;

  DRAWTEXT(平仓,22,‘纪律平仓’),COLORYELLOW;

  DRAWBMP(CURRBARSCOUNT=110,100,‘买入’);

  DRAWNUMBER(CURRBARSCOUNT=105,96,买统计),COLORYELLOW;

  DRAWBMP(CURRBARSCOUNT=90,100,‘赢利’);

  DRAWNUMBER(CURRBARSCOUNT=85,96,盈统计),COLORYELLOW;

  DRAWBMP(CURRBARSCOUNT=70,100,‘盈平仓’);

  DRAWNUMBER(CURRBARSCOUNT=63,96,盈平仓统计),COLORYELLOW;

  DRAWBMP(CURRBARSCOUNT=50,100,‘亏平仓’);

  DRAWNUMBER(CURRBARSCOUNT=43,96,平仓统计-盈平仓统计),COLORYELLOW;

  DRAWBMP(CURRBARSCOUNT=26,100,‘亏了呗’);

  DRAWNUMBER(CURRBARSCOUNT=19,96,买统计-平仓统计-盈统计),COLORYELLOW;

(股票知识网zhishi.southmoney.com)
    股票知识网声明:资讯来源于合作媒体及机构,属作者个人观点,仅供投资者参考,并不构成投资建议。投资者据此操作,风险自担。
商务进行时
股票知识学习
联盟广告

关于股票知识网 -版权声明 -诚聘英才 -广告服务 -网站地图 -
特此声明:广告商的言论与行为均与股票知识网无关
zhishi.southmoney.com
股票知识网 © 版权所有 闽ICP备09035581号