I have written the code and works fine pro back test.
when place order in real system strategy is not starting
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
// Definition of code parameters DEFPARAM CumulateOrders = true // Cumulating positions deactivated // Conditions to enter short positions c1 = (close <= close) IF c1 THEN SELLSHORT 1 PERPOINT AT MARKET ENDIF x=4 if shortonmarket then sellshort 1 perpoint at tradeprice(1)-x stop endif if close >= 1.00019*tradeprice then exitshort at market endif |