2015年6月3日 星期三

陰陽線系列__光腳陰線





----------------------圖文引用自MBA智庫


函數: csbearclosemarubo

[LegacyColorValue = TRUE];
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<=l*((100+leeway)/100);

csbearclosemarubo= condition1 and condition2 ;

策略

input:pmode_entry(1),pmode_exit(2),pexit(4),sl(130),tar(340),pp1(1),pp2(1),
TradeProfit(0.08),TradeStopLoss(0.017);
var:mp(0),pf(0),pl(0);
input: Leeway(0.09), GapPrice(Close), GapSize(1), LongBody(0.9), ATR(15);

mp=marketposition;

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

condition99=csbearclosemarubo(leeway,longbody,atr);

if pmode_entry=1 then begin
 if countif(condition99,3)[0]>=1 and mp=0
  then sellshort("sh1")next bar at market;
end;

if mp=-1 and barssinceentry=pexit then buytocover("ex S") next bar at market;
if mp=-1 then buytocover next bar at highest(h,4) stop;

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


印度指數 2008---現在 成本: 10美元













感想:

陰陽線是日本人研究出來的 沒想到過了2-300年 到現在還 有效,真令人欽佩, 在此我提供原型,其他的就交由讀者盡情發揮,多方面的測試總是會帶給我們許多意想不到驚喜







沒有留言:

張貼留言