短期與長期策略[MC公式]
相關(guān)標(biāo)簽:期貨與期權(quán)套利策略 、 期貨期權(quán)組合策略 、 期貨期權(quán)實戰(zhàn)2017年 、 期權(quán)與期貨的區(qū)別 、 期貨期權(quán)學(xué)院 、 期貨期權(quán)入門 、 期貨期權(quán)遠期 、 期貨與期權(quán)論文 、 商品期貨期權(quán) 、 豆粕期貨期權(quán) 、 期權(quán)對沖期貨 、 期權(quán)和期貨優(yōu)劣 、 期貨期權(quán)交易 、 期貨期權(quán)實訓(xùn) 、 期貨期權(quán)的比較 、 本帖最后由 ipqhjjybj 于 2017-3-21 19:59 編輯
策略報告如此,想問下回測效果這樣的策略有哪里需要注意的么。??1min IF1603 曲線。
策略思想:
? ?? ?? ?? ?? ?? ?1、永遠在場內(nèi),不止盈不止損,每個bar判定多空方向 , 把握趨勢的收益。
? ?? ?? ?? ?? ?? ?2、用過使用 1min的類高頻方法,來控制最大回撤。
? ?? ?? ?? ?? ?? ?3、兩個參數(shù),短期策略參數(shù)與長期策略參數(shù)。
?
C.png (22.11 KB, 下載次數(shù): 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;// www.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;
?
?
?
?
公式導(dǎo)入教程: 【通達信公式源碼導(dǎo)入方法教程】 【同花順公式源碼導(dǎo)入方法教程】 【大智慧新一代公式源碼導(dǎo)入方法教程】
?
有思路,想編寫各種指標(biāo)公式,程序化交易模型,選股公式,預(yù)警公式的朋友
可聯(lián)系技術(shù)人員 QQ: 511411198 進行 有償 編寫!(不貴!點擊查看價格!)
相關(guān)文章
-
沒有相關(guān)內(nèi)容