// 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 = 121500
// Prevents the system from creating new orders to enter the market or increase position size before the specified time
noEntryBeforeTime = 100000
timeEnterBefore = time >= noEntryBeforeTime
// Prevents the system from placing new orders to enter the market or increase position size after the specified time
noEntryAfterTime = 121500
timeEnterAfter = time < noEntryAfterTime
// Conditions to enter long positions
indicator1 = Stochastic[5,3](close)
indicator2 = Average[3](Stochastic[5,3](close))
c1 = (indicator1 CROSSES OVER indicator2)
IF c1 AND timeEnterBefore AND timeEnterAfter THEN
BUY 1 CONTRACT AT MARKET
ENDIF
// Stops and targets
SET STOP pLOSS 10
SET TARGET pPROFIT 10