I need help writing a formula daily time frame.
I would like to see if this is a profitable system.
High - Moving Average (simple 8 day) > Moving Average( simple 8 day) - Moving Average (simple 20 day)
Once I have these events,
a) does price break the 20 simple moving average
b) if it does, how long does it take till it breaks the 20-day SMA.
I want to do this on ETF's, SPY, QQQ, etc.
How would I start to write this code, get the statistical probabilities and then backtest it?