1.寫了一個交易策略,盤中選擇日逐筆洗價和1K逐筆洗價,兩者執行結果有何差異?
2.以下的策略用在當沖,應如何正確選擇頻率?
3.自動交易策略編寫時,是需要配合用哪個頻率方式後再行編寫,若是,應該用甚麼樣的思維或函數?
value1=getField("均價");
value2=(close+open)/2;
value3=average(value2,5);
if position=0 and value3 cross over value1 then setposition(1,market,label:="買1");
if position=1 and filled=1 and q_BestAsk1 > filledAvgPrice*1.005 then setposition(0,q_BestAsk1,label:="賣1");
if position=0 and filled=0 and value3 cross under value1 then setposition(-1,market,label:="賣2");
if position=-1 and filled=-1 and q_BestBid1 < filledAvgPrice*0.995 then setposition(0,q_BestBid1,label:="買2");
 
            
        
        
        
        
            
3 評論