DEFPARAM CumulateOrders = False
StartTime = 133000
LimitEntryTime = 163000
daysForbiddenEntry= OpenDayOfWeek=2 OR OpenDayOfWeek=3 OR OpenDayOfWeek=4 OR OpenDayOfWeek=5 OR OpenDayOfWeek=6 OR OpenDayOfWeek=0
sl= 326
slmove = 5
indicator1 = SAR[0.02,0.02,0.2]
c1 = (open > indicator1)
indicator2 = Average[20](close)+std[20](close)
c2 = (open > indicator2)
indicator4 = BollingerDown[20](close)
c3 = (indicator1 > indicator4)
indicator5 = ExponentialAverage[13](close)
indicator6 = ExponentialAverage[13](close)
c5 = (indicator5 >= indicator6[1])
indicator7 = ExponentialAverage[8](close)
indicator8 = ExponentialAverage[8](close)
c7 = (indicator7 >= indicator8[1])
IF not onmarket and c2 and c1 and c3 and c5 and c7 and time >=StartTime and time <=LimitEntrytime and not daysForbiddenEntry THEN
BUY 1 PERPOINT AT MARKET
slprice = close - sl
sell at slprice stop
ENDIF
c11 = (open < indicator1)
indicator12 = Average[20](close)-std[20](close)
c12 = (open < indicator12)
indicator14 = BollingerUp[20](close)
c13 = (indicator1 < indicator14)
c15 = (indicator5 <= indicator6[1])
c17 = (indicator7 <= indicator8[1])
IF not onmarket and c12 and c11 and c13 and c15 and c17 and time >=StartTime and time <=LimitEntrytime and not daysForbiddenEntry THEN
SELLSHORT 1 PERPOINT AT MARKET
slprice = close + sl
exitshort at slprice stop
ENDIF
if longonmarket and high - sl > slprice + slmove then
slprice = high - sl
endif
if shortonmarket and low + sl < slprice - slmove then
slprice = low + sl
endif
if onmarket then
sell at slprice stop
exitshort at slprice stop
endif