This is a long timeframe script designed to benefit from the correlation with the Percentage of stocks Above 200 moving average from SPX
At the same time with this percentage we are creating a weighted moving average to smooth its accuracy.
The rules are simple : If the moving average is increasing its a long signal/short exit If the moving average is decreased its a short signal/long exit.
Curently the strategy has been adapted for long only entries.