20 Lookback candles above MA
-

I'm trying to code a simple MA alert that will only trigger when. Example for a BUY
- All 3 MAs are spread-out in one direction.
- Gives a signal when a candle closes above the fast MA.
BUT before it gives the signal, it will have to lookback 20 candles and check if. - No candle closes below the slow MA, a wick is allowed to touch or go below and return.
- At least 1 of the candles must touch the medium MA.
i can't seem to attach what i tried doing here.
Any help will be appreciated. Thanks
-
Create a loop that counts candles, then check when enough candles are > or <. https://fxdreema.com/shared/QMnH4RNmb
-
Thanks a lot, i'll try it out
-
Yow will always need to check > because this loop will add numbers, so will always be when the number is high enough.