Price crossing moving average
Forum on trading, automated trading systems and testing trading strategies
When you post code please use the CODE button (Alt-S)!

Please remove empty lines and indent your code properly.
Forum on trading, automated trading systems and testing trading strategies
When you post code please use the CODE button (Alt-S)!

You agree to website policy and terms of use
Hello all,
I've been making a program so I can see what percent of the time a moving average cross (with price) gets faded and what percent of the time it is a breakout. This is purely based on the close of the next candle. Right now it appears that it is claiming every candle close is a breakout or fade, ignoring my condition of crossing the moving average.
Any help would be greatly appreciated!