//Definition of code parameters DEFPARAM CumulateOrders = False //Cumulating positions deactivated //The system will cancel all pending orders and close all positions at 000. No new ones will be allowed until after the FLATBEFORE time. DEFPARAM FLATBEFORE = 090000 //Cancel all pending orders and close all positions at the FLATAFTER time DEFPARAM FLATAFTER = 173000 // Conditions to enter long positions indicator1 = Average[10](Stochastic[36,10](totalPrice)) indicator2 = Stochastic[36,10](totalPrice) c1 = (indicator1 CROSSES UNDER indicator2) IF c1 THEN BUY 1 SHARES AT MARKET ENDIF // Conditions to enter short positions indicator3 = Average[10](Stochastic[36,10](totalPrice)) indicator4 = Stochastic[36,10](totalPrice) c2 = (indicator3 CROSSES OVER indicator4) IF c2 THEN SELLSHORT 1 SHARES AT MARKET ENDIF // Stops and targets SET STOP pLOSS 30 pTRAILING 18