|
本帖最後由 adam1980gogo 於 15-7-10 08:44 編輯
大家好,我是MC新手
最近在練習語法的時候,有幾個問題不懂
1.如果我是固定要在每天某個時段進場,例如30分線週期的10點15分收盤價進場,
該怎麼寫?直接if time=1015???
2.承上,如果我1.成交,然後我想在下一根30K停利停損,(就是10點45)出場
應該怎麼寫?
以進場價獲利20點停利的話,我想法是這樣:
if 10點15分收盤價 then begin
buy this bar on close;
sell next bar at entryprice+20 limit ;
end;
if marketposition > 0 then
sell next bar at entryprice+20 limit ;
另外我有買書回來看,有提到用this bar會有績效回測的失真問題,應該怎麼修正比較好呢?
初學者,問題很笨,請見諒。 |
|