// CongaLine EUR/USD 1h, made by JEBUS89, V1 20.06.2019
// Definition of code parameters
DEFPARAM CumulateOrders = False // Cumulating positions deactivated
// Prevents the system from creating new orders to enter the market or increase position size before the specified time
noEntryBeforeTime = 170000
timeEnterBefore = time >= noEntryBeforeTime
// Prevents the system from placing new orders to enter the market or increase position size after the specified time
noEntryAfterTime = 235959
timeEnterAfter = time < noEntryAfterTime
// Conditions to enter long positions
indicator1 = SuperTrend[1,10]
c1 = (close > indicator1)
indicator2 = SuperTrend[3,10]
c2 = (close > indicator2)
c3 = (close < open)
c4 = (close[1] < open[1])
indicator3 = Average[20](close)
c5 = (close > indicator3)
IF (c1 AND c2 AND c3 AND c4 AND c5) AND timeEnterBefore AND timeEnterAfter THEN
BUY 1 CONTRACT AT MARKET
ENDIF
// Conditions to exit long positions
c6 = (close CROSSES OVER close[1])
IF c6 THEN
SELL AT MARKET
ENDIF
// Conditions to enter short positions
indicator4 = SuperTrend[1,10]
c7 = (close < indicator4)
indicator5 = SuperTrend[3,10]
c8 = (close < indicator5)
c9 = (close > open)
c10 = (close[1] > open[1])
indicator6 = Average[20](close)
c11 = (close < indicator6)
IF (c7 AND c8 AND c9 AND c10 AND c11) AND timeEnterBefore AND timeEnterAfter THEN
SELLSHORT 1 CONTRACT AT MARKET
ENDIF
// Conditions to exit short positions
c12 = (close CROSSES UNDER close[1])
IF c12 THEN
EXITSHORT AT MARKET
ENDIF
// Stops and targets
SET STOP pLOSS 30