INPUT: DA(6,1,100),FY(5,5,40),CT(1,1,60),P(0,0,60),N(3,0,60);
DRAWGBK(CLOSE<HHV(HIGH,0),COLORRGB(60,15,35),COLORRGB(50,50,90),1);
STICKLINE(CLOSE>OPEN OR CLOSE=OPEN AND CLOSE>REF(CLOSE,1),LOW,HIGH,0.5,0),LINETHICK5,color10000;STICKLINE(CLOSE<OPEN OR CLOSE=OPEN AND CLOSE<=REF(CLOSE,1),LOW,HIGH,0.5,0),LINETHICK5,color10000;X:=(BARSLAST((SYSPARAM(2)=BARPOS))+1);NS:=IF((HHV(ABS(((HHV(CLOSE,DA)/LLV(CLOSE,DA))-1)),DA)>(10/100)),3,DA);N1:=IF((DATATYPE=2),(NS*48),IF((DATATYPE=3),(NS*16),IF((DATATYPE=4),(NS*8),IF((DATATYPE=5),(NS*4),NS))));MM:=IF((((STKTYPE=0) OR (P=0)) OR (VOL=0)),MA(CLOSE,N1),((SUM(AMOUNT,N1)/SUM(VOL,N1))/100));M1:=REF(MM,1);买入:=IF(CROSS(CLOSE,M1),M1,0);卖出:=IF(CROSS(M1,CLOSE),M1,0);YE:=BARPOS;fei用:=(FY/1000);DW:=BARSLAST((卖出>0));EX10:=HHV((买入>0),(DW+1));BJ:=IF((EX10>REF(EX10,1)),买入,0);SJ:=IF((EX10<REF(EX10,1)),卖出,0);BNN:=BARSLAST((BJ>0));CC:=REF(BJ,BNN);盈利:=((SJ*(1-fei用))-(CC*(1+fei用)));YL:=SUM(IF((SJ>0),盈利,0),0);每股盈利:=YL,LINETHICK0,PRECISION2,colorFFFFFF;CN:=SUM(IF(((SJ>0) AND (REF(CC,1)>0)),1,0),0);CG:=SUM(IF(((SJ>0) AND (盈利>0)),1,0),0);成功率:=((100*CG)/CN),LINETHICK0,PRECISION1,color88FF;H1:=HHV(IF((CT=2),成功率,YL),X);L1:=LLV(IF((CT=2),成功率,YL),X);AH:=H1[DATACOUNT];AL:=L1[DATACOUNT];AHL:=(AH-AL);POLYLINE((CT=2),成功率),color88FF;买入均价:=(SUM(BJ,0)/CN),LINETHICK0,PRECISION1,colorFF;年收益:=((100*((240*YL)/YE))/买入),LINETHICK0,PRECISION1,colorFF;持股时间:=(SUM(IF(((SJ>0) AND (CC>0)),(REF(BNN,1)+1),0),0)/YE),LINETHICK0,PRECISION2,colorFF00FF;交易:=CN,LINETHICK0,PRECISION0,colorAAAAAA;(次)成功:=CG,LINETHICK0,PRECISION0,colorAAAAAA;年交均次:=((240*CN)/YE);MON:=SUM(IF((MONTH<>REF(MONTH,1)),1,0),0);上市年:=(MON/12);DRAWNUMBER((BJ>0),(LOW*0.95),BJ,2),ALIGN0,colorFF;DRAWICON(((BJ>0) AND (CT=1)),(LOW*0.97),4);DRAWNUMBER((((SJ>0) AND (CT=1)) AND (((盈利/(CC*(1+fei用)))*100)>=0)),(HIGH*1.1),((盈利/(CC*(1+fei用)))*100),1),ALIGN0,colorFF;DRAWNUMBER((((SJ>0) AND (CT=1)) AND (((盈利/(CC*(1+fei用)))*100)<0)),(HIGH*1.1),((盈利/(CC*(1+fei用)))*100),1),ALIGN0,colorFFFF;DRAWICON(((SJ>0) AND (CT=1)),(HIGH*1.04),5);DRAWNUMBER(((SJ>0) AND (CT=1)),(HIGH*1.07),SJ,2),ALIGN0,colorFF00;N波动:=(SUM(IF((((SJ>0) AND (CC>0)) AND ((REF(BNN,1)+1)<=N)),(REF(BNN,1)+1),0),0)/YE),LINETHICK0,PRECISION2,colorFF00FF;买价:=IF((BJ>0),BJ,0),LINETHICK0,PRECISION2,colorFF;卖价:=IF((SJ>0),SJ,0),LINETHICK0,PRECISION2,colorFF00;DRAWTEXTEX(CLOSE,1,0,0,(((((((((((((((((('年盈利:'+NUMTOSTR(YL,2))+'元 成功率:')+NUMTOSTR(成功率,1))+'% 年收益:')+NUMTOSTR(年收益,1))+'%')+' 持股时间比:')+NUMTOSTR(持股时间,1))+'\n')+'交易:')+NUMTOSTR(交易,0))+'次 成功:')+NUMTOSTR(CG,0))+'次 年均:')+NUMTOSTR(年交均次,1))+'次 总共:')+NUMTOSTR(YE,0))+'K线')),colorFFFF;临界:=(((CLOSE/M1)-1)*100);增减:=(临界-(100*((REF(CLOSE,1)/REF(M1,1))-1)));DRAWTEXTEX(CLOSE,1,500,0,(((((((('当前 信号持续:'+NUMTOSTR(BNN,0))+'(K线)')+' 最高盈利:')+NUMTOSTR(HHV((((HIGH/CC)-1)*100),(BNN+1)),1))+'% 买卖临界点:')+NUMTOSTR(临界,1))+'% 增减:')+NUMTOSTR(IF(((BNN>0) AND (DATATYPE=6)),增减,IF((BNN=0),0,-100)),1))),colorFFFF;DRAWTEXT(((SYSPARAM(3)=BARPOS) AND (CT<3)),HIGH,'.'),color1;DRAWTEXT(((SYSPARAM(3)=BARPOS) AND (CT<3)),LOW,'.'),color1;参考介入价:MM,LINETHICK0,PRECISION2,colorFFFFFF;FUA:=HHV(HIGH,15);FUB:=LLV(LOW,15);{DRAWTEXTEX(CLOSE,1,720,60,(('15日最高价:'+NUMTOSTR(FUA,2))+' ')),ALIGN2,colorFF;}{DRAWTEXTEX(CLOSE,1,840,60,(('15日最低价:'+NUMTOSTR(FUB,2))+' ')),ALIGN2,colorBB0000;}{DRAWTEXTEX(CLOSE,1,950,60,(('参考介入价:'+NUMTOSTR(MM,2))+' ')),ALIGN2,colorEE9999;}STICKLINE(CLOSE>=mm,HIGH,LOW,1,0),color0000ff;STICKLINE(CLOSE<mm,LOW,HIGH,1,0),color00ff00;STICKLINE(CLOSE>OPEN OR CLOSE=OPEN AND CLOSE>REF(CLOSE,1),OPEN,CLOSE,9,0),LINETHICK5,color10000;STICKLINE(CLOSE<OPEN OR CLOSE=OPEN AND CLOSE<=REF(CLOSE,1),OPEN,CLOSE,9,0),LINETHICK5,color10000;STICKLINE(CLOSE>=mm,CLOSE,OPEN,8,0),color000055;STICKLINE(CLOSE>=mm,CLOSE,OPEN,7,0),color000077;STICKLINE(CLOSE>=mm,CLOSE,OPEN,5.8,0),color000099;STICKLINE(CLOSE>=mm,CLOSE,OPEN,4.4,0),color0000bb;STICKLINE(CLOSE>=mm,CLOSE,OPEN,2.8,0),color0000dd;STICKLINE(CLOSE>=mm,CLOSE,OPEN,1,0),color0000ff;STICKLINE(CLOSE<mm,CLOSE,OPEN,8,0),color005500;STICKLINE(CLOSE<mm,CLOSE,OPEN,7,0),color007700;STICKLINE(CLOSE<mm,CLOSE,OPEN,5.8,0),color009900;STICKLINE(CLOSE<mm,CLOSE,OPEN,4.4,0),color00bb00;STICKLINE(CLOSE<mm,CLOSE,OPEN,2.8,0),color00dd00;STICKLINE(CLOSE<mm,CLOSE,OPEN,1,0),color00ff00;STICKLINE(((BJ > 0) AND (CT = 1)),OPEN,(OPEN+CLOSE)/2,8,0),color0033ff;STICKLINE(((BJ > 0) AND (CT = 1)),OPEN,(OPEN+CLOSE)/2,7,0),color0066ff;STICKLINE(((BJ > 0) AND (CT = 1)),OPEN,(OPEN+CLOSE)/2,5.8,0),color0099ff;STICKLINE(((BJ > 0) AND (CT = 1)),OPEN,(OPEN+CLOSE)/2,4.4,0),color00bbff;STICKLINE(((BJ > 0) AND (CT = 1)),OPEN,(OPEN+CLOSE)/2,2.8,0),color00ddff;STICKLINE(((BJ > 0) AND (CT = 1)),OPEN,(OPEN+CLOSE)/2,1,0),color00ffff;STICKLINE(((SJ>0) AND (CT=1)),CLOSE,(CLOSE+OPEN)/2,8,0),colorff4400;STICKLINE(((SJ>0) AND (CT=1)),CLOSE,(CLOSE+OPEN)/2,7,0),colorff7700;STICKLINE(((SJ>0) AND (CT=1)),CLOSE,(CLOSE+OPEN)/2,5.8,0),colorff9911;STICKLINE(((SJ>0) AND (CT=1)),CLOSE,(CLOSE+OPEN)/2,4.4,0),colorffbb22;STICKLINE(((SJ>0) AND (CT=1)),CLOSE,(CLOSE+OPEN)/2,2.8,0),colorffdd33;STICKLINE(((SJ>0) AND (CT=1)),CLOSE,(CLOSE+OPEN)/2,1,0),colorffff33;STICKLINE(((SJ>0) AND (CT=1)),OPEN,(CLOSE+OPEN)/2,8,0),color550000;STICKLINE(((SJ>0) AND (CT=1)),OPEN,(CLOSE+OPEN)/2,7,0),color770000;STICKLINE(((SJ>0) AND (CT=1)),OPEN,(CLOSE+OPEN)/2,5.8,0),color990000;STICKLINE(((SJ>0) AND (CT=1)),OPEN,(CLOSE+OPEN)/2,4.4,0),colorbb0000;STICKLINE(((SJ>0) AND (CT=1)),OPEN,(CLOSE+OPEN)/2,2.8,0),colordd0000;STICKLINE(((SJ>0) AND (CT=1)),OPEN,(CLOSE+OPEN)/2,1,0),colorff0000;LOCK:=IF((CURRENTDATE<1341231),1,0)ALIGN3,colorFF00FF;空:=EMA(CLOSE,5);均衡:EMA(空,0),colorFFFFFF;下趋势、双线持币:HHV(MA(HIGH,(3*LOCK)),2),LINETHICK2,colorFF00;上趋势、单线持股:LLV(MA(HIGH,(3*LOCK)),1),LINETHICK2,colorFF;
|