4

I have the code below which would add filter based on my current (15min) chart time frame. My question is, how can I add to it to also look for the same but on 1hr chart? In other words, 15min chart and one hour chart would give me a signal to go long ONLY when s21ema > s50ema and s50ema > s200sma and when on 15min chart, s10ema crossover s21ema?. The opposit would be for a short signal

longCond = crossover(s10ema, s21ema) and (s21ema > s50ema) and (s50ema > s200sma)
shortCond = crossunder(s10ema, s21ema) and (s21ema < s50ema) and (s50ema < s200sma)
PineCoders-LucF
  • 8,288
  • 2
  • 12
  • 21
forexfibs
  • 89
  • 1
  • 1
  • 3

0 Answers0