期貨期權(quán)交流加倉(cāng)策略問(wèn)題
作者:MC 來(lái)源:cxh99.com 發(fā)布時(shí)間:2017年08月12日
-
咨詢內(nèi)容:
input:length(81), Num0(50),Num1(100);
vars:MA81(0),mp(0),b_flag(0),s_flag(0);
mp=marketposition;
MA81=Average(close,length);
value3=Num0*1 point *MinMove;
value4=Num1*1 point *MinMove;
condition1=close cross over MA81;
condition2=close cross under MA81;
condition11=close>=entryprice+value3;
condition12=close>=entryprice+value4;
condition21=close<=entryprice-value3;
condition22=close<=entryprice-value4;
if condition1 and mp<=0 then buy("1") next bar at market;
if condition11??then buy("2") next bar at market;
if condition12??then buy("3") next bar at market;
if condition2 and mp>=0 then sellshort("-1") next bar at market;
if condition21??then sellshort("-2") next bar at market;
if condition22??then sellshort("-3") next bar at market;
為什么加倉(cāng)后平倉(cāng),會(huì)再有加倉(cāng)呢?我的策略哪塊有問(wèn)題?能幫我解答下嗎。謝謝
昨天?10:12 上傳
下載附件(6.92 KB)
?
-
MC技術(shù)部:
condition12和condition11條件同時(shí)滿足,導(dǎo)致“2”和“3”同時(shí)在2017-7-26號(hào)21:54:00進(jìn)場(chǎng),而condition2條件在2017-7-26號(hào)22:21:00上成立導(dǎo)致“-1”空頭進(jìn)場(chǎng),“-1”先將之前的兩筆多頭”2“和”3“平倉(cāng),然后再反向開(kāi)空倉(cāng)一手。績(jī)效報(bào)告是這樣顯示的,它是將每筆進(jìn)場(chǎng)和對(duì)應(yīng)的出場(chǎng)顯示在同一個(gè)交易編號(hào)下;這個(gè)不是您所說(shuō)的”加倉(cāng)后平倉(cāng),會(huì)再有加倉(cāng)“的問(wèn)題。