Just spent most of the day and I’m embarrassed, I’ve been renovating my house for the last few years, come back for a bit of relief, but I can’t seem to programme anything.
This is really simple.
For a buy, on next candle open. 9am.
Between 8am-9am, the candle body, must close in-between previous periods (7am-8am) high and low.
Price above EMA9.
RSI over 50.
No trades, if conditions not met.
Stop: ATR +15, if ATR under 20,
Stop: ATR+30, if ATR over 20
Target: ATR of period between 7am-8am.
For a sell, on next candle open, 9am.
Between 8am-9am, the candle body, must close in-between previous periods (7am-8am) high and low.
Price below EMA9.
RSI under 50.
No trades, if this doesn’t happen.
Stop: ATR +15, if ATR under 20,
Stop: ATR+30, if ATR over 20
Target: ATR of period between 7am-8am.
Thanks in advance.
JSParticipant
Master
Hi @abacus23
Try this… may be renovated 😉
TimeFrame(Hourly, UpdateOnClose)
EMA9 = Average[9,1](Close)
xRSI = RSI[14](Close)
xATR = AverageTrueRange[14](Close)
If OpenTime = 080000 and Close < High[1] and Close > Low[1] and Close > EMA9 and xRSI > 50 then
Buy 1 Contract at Market
If xATR < 20 then
Set Stop Loss (xATR + 15) * PipSize
Else
Set Stop Loss (xATR + 30) * PipSize
EndIf
Set Target Profit xATR[1] * PipSize
EndIf
If OpenTime = 080000 and Close < High[1] and Close > Low[1] and Close < EMA9 and xRSI < 50 then
SellShort 1 Contract at Market
If xATR < 20 then
Set Stop Loss (xATR + 15) * PipSize
Else
Set Stop Loss (xATR + 30) * PipSize
EndIf
Set Target Profit xATR[1] * PipSize
EndIf
Many thanks.
I’ll give that a try.