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