DEFPARAM CumulateOrders = False // Cumulating positions deactivated
once n = 1
noEntryBeforeTime = 140000
timeEnterBefore = time >= noEntryBeforeTime
// Prevents the system from placing new orders to enter the market or increase position size after the specified time
noEntryAfterTime = 213000
timeEnterAfter = time < noEntryAfterTime
/// Conditions to enter long positions
c1 = (close[1] <= close[2])
c2 = (close[2] <= close[3])
c3 = (close >= close)
indicator1 = Volume
c4 = (indicator1 >= indicator1[1])
indicator2 = Average[20](close)
indicator3 = Average[50](close)*1.00044
c5 = (indicator2 >= indicator3)
IF (c1 AND c2 AND c3 AND c4 AND c5) AND timeEnterBefore AND timeEnterAfter THEN
IF PositionPerf(1) <0 THEN
n = n+1
ELSIF PositionPerf(1) =0 THEN
n = n+1
ELSIF PositionPerf(1) >0 THEN
n = n+1
ENDIF
buy n contracts at market
Endif
Set Stop pLoss 14
Set Target pProfit 120