// Definition of code parameters
DEFPARAM CumulateOrders = true // Cumulating positions deactivated
if time > 080800 and time < 210000 then
// Conditions to enter long positions
indicator2, indicator1 = CALL johne
c1 = (indicator1 >= indicator2)
x=6
c11 = (indicator1[1] >= indicator2[1])
c111 = (indicator1[2] >= indicator2[2])
IF c1 or c11 or c111 and not onmarket THEN
BUY 1 CONTRACT AT MARKET
ENDIF
if longonmarket then
buy 1 perpoint at POSITIONPRICE+x stop
endif
if shortonmarket then
sellshort 1 perpoint at POSITIONPRICE-x stop
endif
// Conditions to enter short positions
ignored, indicator3 = CALL johne
indicator4, ignored = CALL johne
c2 = (indicator3 CROSSES UNDER indicator4)
c22 = (indicator3[1] CROSSES UNDER indicator4[1])
c222 = (indicator3[2] CROSSES UNDER indicator4[2])
IF c2 or c22 or c222 and not onmarket THEN
SELLSHORT 1 CONTRACT AT MARKET
ENDIF
if longonmarket and c2 then
sell at market
endif
if shortonmarket and c1 then
exitshort at market
endif
endif
set stop loss 40
set target profit 28