2012   

 

希望利用連續上漲的紅K和連續下跌的黑K,搭配布林軌道線來當作買賣訊號的依據。當K棒連續收紅或是連續收黑,而且當布林通道的斜率往上或往下就買進或賣出

如何轉換成multicharts語法

找出布林軌道的公式

AVG = AverageFC( close, Length ) ; 中間值是移動平均線 

value1 = StandardDev( close, Length, 1 ) ; 布林軌道的標準差

UPline = AVG + NumDevsUp * value1 ; 布林上通道

DOWNline = AVG + NumDevsDn * value1 ; 布林下通道

定義K棒的型態

condition1=CountIf(close>open,3)>=3; 連續三根K棒收紅K

condition2=CountIf(close>close[1],3)>=3; 連續三根K收漲

condition3=CountIf(open>open[1],3)>=3; 連續三根K棒開盤價大於前一根開盤價

condition4=open>open[1] and open[1]>open[2]and close>close[1] and close[1]>close[2]; 開盤價和收盤價都連續漲

condition5=CountIf(UPline>UPline[1], 3)>=3; 定義布林軌道上軌道斜率往上

 if condition1 and condition2 and condition3 and condition4 and condition5 

and marketposition=0  then buy  next bar at Highest(high,5) stop;

確認K棒的型態加上布林通道的軌道當濾網作多

 condition6=CountIf(close<open,3)>=3; 連續三根K棒收黑K

condition7=CountIf(close<close[1],3)>=3; 連續三根K棒收跌

condition8=CountIf(open<open[1],3)>=3; 連續三根K棒開盤價小於前一根收盤價

condition9=close<close[1] and close[1]<close[2] and open<open[1] and open[1]<open[2];  開盤價和收盤價都連續跌

condition10=CountIf(DOWNline<DOWNline[1],3)>=3; 布林通道的下通道斜率往下 

if condition6 and condition7 and condition8 and condition9  and condition10

and marketposition=0 then sellshort next bar at lowest(low,5) stop; 

用K棒的型態加上布林通道軌道濾網作空

後半段加入停損停利的機制 

2010  

2011  

回測數據看起來還不錯,搭配更好的出場機制,才是完美的交易策略。透過multicharts回測找出適合的參數,可以提升交易的績效;找到適合的商品和適合的交易周期,也可以提升交易品質。

研發策略需要更多的創意和想法,以及看盤交易的經驗。以上心得分享 歡迎留言討論。 或是追蹤我的 FB粉絲頁   https://www.facebook.com/upup12341234

 

 

arrow
arrow

    元大期貨楊宗儒 發表在 痞客邦 留言(0) 人氣()