期貨期權交流加倉策略問題
作者:MC 來源:cxh99.com 發(fā)布時間:2017年08月12日
-
咨詢內容:
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;
為什么加倉后平倉,會再有加倉呢?我的策略哪塊有問題?能幫我解答下嗎。謝謝
昨天?10:12 上傳
下載附件(6.92 KB)
?
-
MC技術部:
condition12和condition11條件同時滿足,導致“2”和“3”同時在2017-7-26號21:54:00進場,而condition2條件在2017-7-26號22:21:00上成立導致“-1”空頭進場,“-1”先將之前的兩筆多頭”2“和”3“平倉,然后再反向開空倉一手。績效報告是這樣顯示的,它是將每筆進場和對應的出場顯示在同一個交易編號下;這個不是您所說的”加倉后平倉,會再有加倉“的問題。