Hi,
Could anyone help out coding following:
- timeframe 4h. When 6 bars in a row have closed lower (6 red bars in a row)
- timeframe 5 min, when 2 bars in a row have closed higher (2 green bars in a row) Buy 1 contract
There you go:
Defparam CumulateOrders = false
Timeframe(4 hour,UpdateOnClose)
Bearish = close < open
c1 = (summation[6]((close < close[1]) AND Bearish) = 6)
Timeframe(5 minute,UpdateOnClose)
Bullish = close > open
c2 = (summation[2]((close > close[1]) AND Bullish) = 2)
Timeframe(default)
If c1 AND c2 AND Not OnMarket THEN
Buy 1 contract at Market
ENDIF