|
|
用于飞狐的副图:(别问我其他的股软); 类似的模型。
1,低位但30日内RSI 不是最低以及股价不是最低的星线,2,卖出条件:如果到达*2*ATR+h或者hxb由粉变白时的收盘价或前星线的最低价。
3,盘中粉数字是止盈价,绿数字时卖出时的获利百分比(不含手续费)。
我的理解:1.必须严格执行规则。 2.当天收盘如果大于买入价,则成功率会提高。3,以下程序纯用来学习楼主的交易系统的一种验证,不要用来操作。
kline(o,h,l,c,0);
TR0 := MAX(MAX((HIGH-LOW),ABS(REF(CLOSE,1)-HIGH)),ABS(REF(CLOSE,1)-LOW));
ATR := MA(TR,20);
hxb:ref(max(c,o),1)-(ref(max(c,o),3)-ref(max(c,o),1))/2,colorwhite;
partline(c>hxb,hxb),colorff00ff;
LC := REF(CLOSE,1);
RSI1:=SMA(MAX(CLOSE-LC,0),5,1)/SMA(ABS(CLOSE-LC),5,1)*100;
hl:=h-l;
lx0:=((h-l)/abs(c-o)>3.5 or ((hl-llv(hl,7))/(hhv(hl,7)-llv(hl,7))<0.3 and abs(c/o-1)<0.015));
stickline(lx0,h,l,0.1,0),coloryellow;
stickline(lx0 and tr0>atr/1.2,h,l,0.1,0),colorff00ff;
lx:=((h-l)/abs(c-o)>3.5 or ((hl-llv(hl,7))/(hhv(hl,7)-llv(hl,7))<0.25 and abs(c/o-1)<0.015)) and ref((c-llv(l,4))/(hhv(h,4)-llv(l,4)),1)<0.25;
stickline(lx and tr0<=1.2*atr,h,l,0.1,0),colorgreen;
lxh:=ref(h,1)<=ref(h,2) and ((ref(lx,1) and h>ref(h,1)) or (ref(lx,2) and ref(h,1)<=ref(h,2) and h>ref(h,2)))and llv(rsi1,5)>llv(rsi1,30);
drawtext(lxh and llv(rsi1,5)>llv(rsi1,30),l,'*'),colorgreen,align0,pxdn15;
drawtext(lxh and llv(rsi1,5)>llv(rsi1,30) and llv(l,5)>llv(l,30),l,'*'),colorff00ff,align0,pxdn15;
stickline(lxh,ref(h,1),ref(h,1)+0.02,9,0),coloryellow;
drawnumber(lxh,2*ref(atr,1)+ref(h,1),2*ref(atr,1)+ref(h,1),2),colorff00ff,align1,pxup30;
stickline(lxh,2*ref(atr,1)+ref(h,1),2*ref(atr,1)+ref(h,1)+0.03,7,0),colorred;
stickline(lxh,2*ref(atr,1)+ref(h,1),2*ref(atr,1)+ref(h,1)+0.03,7,0),colorred,shift1;
stickline(lxh,2*ref(atr,1)+ref(h,1),2*ref(atr,1)+ref(h,1)+0.03,7,0),colorred,shift2;
sd:=filter(CROSS(hxb,C) and barslast(lxh)+1<5 and barslast(lxh)+1>1,5);
drawtext(sd,h,'s'),colorgreen,align0,pxup25;
sj:if(sd and hhv(h,barslast(lxh))>=ref(h,barslast(lxh)+1)+2*ref(atr,barslast(lxh)+1),ref(h,barslast(lxh)+1)+2*ref(atr,barslast(lxh)+1),MAX(c,REF(L,BARSLAST(LXH)+1))),linethick0;
DRAWNUMBER(SD,H,100*(SJ/REF(H,BARSLAST(LXH)+1)-1),2),COLORGREEN,PXUP45;
//
[ 本帖最后由 838506 于 2012-2-5 17:45 编辑 ] |
|
|