Hi all!
I am wondering how you would write a code to test a strategy. I would need to know when price closes below a percentage below a simple moving average, when the following day closes above a percentage below a simple moving average, and when price moves above the day price closed above a percentage below a simple moving average.
All this with having a stop below percentage below a simple moving average.
Thank you in advance!
I am wondering how you would write a code to test a strategy. I would need to know when price closes below a percentage below a simple moving average, when the following day closes above a percentage below a simple moving average, and when price moves above the day price closed above a percentage below a simple moving average.
All this with having a stop below percentage below a simple moving average.
Thank you in advance!
Last edited: