Forums › ProRealTime English forum › ProOrder support › System Error Message when Probacktesting › Reply To: System Error Message when Probacktesting
01/14/2020 at 3:16 AM
#116716
Hello GraHal,
The simple code I used follows for your review. Many thanks!!!!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
// Definition of code parameters DEFPARAM CumulateOrders = False // Cumulating positions deactivated // The system will cancel all pending orders and close all positions at 0:00. No new ones will be allowed until after the "FLATBEFORE" time. DEFPARAM FLATBEFORE = 100000 // Cancel all pending orders and close all positions at the "FLATAFTER" time DEFPARAM FLATAFTER = 171500 // Conditions to enter long positions c1 = (high >= low[10]) IF c1 THEN BUY 1 CONTRACT AT MARKET ENDIF // Conditions to exit long positions indicator1 = Williams[32](close) c2 = (indicator1 < indicator1[1]) IF c2 THEN SELL AT MARKET ENDIF |