2015年6月19日 星期五

陰陽線系列__執帶+__TXF

形態描述:多頭執帶是一根光腳陽線,它是指在下跌趨勢中,股價大幅跳空低開,開盤價與前一天收盤價形成一個較大的跳空缺口,開盤價就是當天的最低價,之後逆勢走高,並以接近最高價的價格收盤。多頭執帶的辨認方法: 1、開盤價就是當天的最低價,因此沒有下影線。2、開盤價與前一天的K縣實體之間有一個較大的跳空缺口。 3、收盤價接近當天最高價,但並不一定是最高價 多頭執帶蘊含的市場心理 股價繼續在下跌趨勢中運行,空方仍舊掌握市場,當股價以低於前一天收盤價的價格開盤。由於之前的連續下跌以及大幅跳空,使空方動能基本上得到釋放,與此同時,多方力量開始積聚,於是價格在買盤的推升下逐步走高,甚至引發了空頭的回補,從而進一步推動價格上漲,最終股價以接近當天最高價收盤。
 注意事項:1、多頭執帶的實體越長,向上反轉的力度越大。2、多頭執帶是否能形成反轉,需要次一交易日市場價格的確認,次一交易日價格繼續上漲,投資者方可介入做多




函數名稱 cs2bullbelthold

input: Leeway(numericsimple), GapPrice(numericseries), GapSize(numericsimple), LongBody(numericsimple), ATR(numericsimple),
 TrendPrice(numericseries), TrendFilter(numericseries);

var: body(0);
if c>o then body=c-o else body=o-c;

condition1= c>o and body>=avgtruerange(ATR)*longbody;
condition2= o<=l*((100+leeway)/100);
condition3= o<=gapprice[1]-avgtruerange(ATR)*gapsize;
condition4= trendprice<=trendfilter;

cs2bullbelthold= condition1 and condition2 and condition3 and condition4 ;


策略
input:pmode_entry(1),pmode_exit(2),pexit(4),sl(130),tar(340),pp1(1),pp2(1),
      TradeProfit(0.048),TradeStopLoss(0.015);
vars: daycount(0),mp(0),isBalanceDay(false),pf(0),pl(0);
input: Leeway(0.11), GapPrice(Close), GapSize(0.6), LongBody(0.5), ATR(20),
 TrendPrice(Open[1]), TrendFilter(Lowest(open[1],5));  
  
Var:    NShares(1),
        TotalEquity(0),
        TradeRisk(0),beforenetprofit(0);

if DAYofMonth(Date next bar) > 14 and DAYofMonth(Date next bar) < 22 and DAYofWeek(Date next bar)= 3 then isBalanceDay = True else isBalanceDay =False ;
 mp=marketposition;

pf = AvgPrice*TradeProfit ;
pl = AvgPrice*TradeStopLoss ;

condition99=cs2bullbelthold(leeway,GapPrice,GapSize,longbody,ATR,TrendPrice,TrendFilter);

 if condition99[1] 
 then buy("b1")NShares contract next bar at market;

if pmode_exit=2 then begin
  if mp=1 then sell("s l") next bar at lowest(l,4) stop; 
  if mp=1 and barssinceentry=pexit  then sell("ex L") next bar at market;
end;

setstopcontract;
setstoploss((pl*bigpointvalue));
setprofittarget((pf*bigpointvalue));




後記:交易次數不多,但是賺賠比高.勝率高,接下來測試印度.A50再與讀者分享

沒有留言:

張貼留言