选股条件:=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;
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。
评论(0)