相關標簽:期貨與期權套利策略 、 期貨期權組合策略 、 期貨期權實戰2017年 、 期權與期貨的區別 、 期貨期權學院 、 期貨期權入門 、 期貨期權遠期 、 期貨與期權論文 、 商品期貨期權 、 豆粕期貨期權 、 期權對沖期貨 、 期權和期貨優劣 、 期貨期權交易 、 期貨期權實訓 、 期貨期權的比較 、 本帖最后由 ipqhjjybj 于 2017-3-21 19:59 編輯
策略報告如此,想問下回測效果這樣的策略有哪里需要注意的么。??1min IF1603 曲線。
策略思想:
? ?? ?? ?? ?? ?? ?1、永遠在場內,不止盈不止損,每個bar判定多空方向 , 把握趨勢的收益。
? ?? ?? ?? ?? ?? ?2、用過使用 1min的類高頻方法,來控制最大回撤。
? ?? ?? ?? ?? ?? ?3、兩個參數,短期策略參數與長期策略參數。
?
C.png (22.11 KB, 下載次數: 6) 2017-3-21 18:37 上傳 點擊文件名下載附件 ?
input: attrShortN(6) , attrLongM(9) ;
var: max_mi(0.0),min_mi(0.0),shortDirection(0),aveLongM_lag1(0.0),
? ???aveLongM(0.0) ,??longDirection(0) , nowDirection(0);
max_mi = Highest(High[1] ,attrShortN - 2);
min_mi = Lowest(Low[1] , attrShortN - 2);
shortDirection = 0;
if close <= min_mi and close <= Open[attrShortN-1] then shortDirection = -1;
if close >= max_mi and close >= Open[attrShortN-1] then shortDirection = 1;
aveLongM_lag1 = Average( Close[1] , attrLongM);
aveLongM = Average( Close , attrLongM);
longDirection = 0;
if aveLongM >= aveLongM_lag1 then longDirection = 1;
if aveLongM < aveLongM_lag1 then longDirection = -1;
nowDirection = longDirection;
if shortDirection <> 0 then nowDirection = shortDirection;
if marketposition = 0 then begin
? ? ? ? if nowDirection > 0 then buy ("bk") next bar market;? ? ? ?
? ? ? ? if nowDirection < 0 then sellshort ("sk") next bar market;
end;// m.kzuj.com.cn
if marketposition > 0 and nowDirection < 0 then sellshort ("ns") next bar market;
if marketposition < 0 and nowDirection > 0 then buy ("nb") next bar market;
?
?
?
?
公式導入教程: 【通達信公式源碼導入方法教程】 【同花順公式源碼導入方法教程】 【大智慧新一代公式源碼導入方法教程】
?