光頭陽線若出現在低價位區域,在分時走勢圖上表現為股價探
底後逐浪走高且成交量同時放大,預示為一輪上升行情的開
始。如果出現在上升行情途中,表明後市繼續看好
----------------------圖文引用自MBA智庫
函數:csbullclosemarubo
input: Leeway(numericsimple), LongBody(numericsimple), ATR(numericsimple);
var: body(0);
if c>o then body=c-o else body=o-c;
condition1= c>o and body>=avgtruerange(ATR)*longbody;
condition2= c>=h*((100-leeway)/100);
csbullclosemarubo= condition1 and condition2 ;
程式
input:pmode_entry(1),pmode_exit(2),pexit(4),sl(130),tar(340),pp1(1),pp2(1),
TradeProfit(0.069),TradeStopLoss(0.012);
vars: daycount(0),mp(0),isBalanceDay(false),pf(0),pl(0);
input: Leeway(0.1), GapPrice(Close), GapSize(1), LongBody(1), ATR(20);
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=csbullclosemarubo(leeway,longbody,atr);
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));
商品 TXF 日K 測試期間 2005--2015 成本 1000元
交易次數不多 但策略原型 就有如此的好表現
讀者可再深入研究
沒有留言:
張貼留言