Version 3.00
• Added options to generate open and close for both long and short positions. So if you are in a long position and your criteria for a negative signal is met it will close your long, if another negative signal is generated it will open a short. If you're just trading the crossover this will keep you permanently trading short or long, as it's only when there are two or more consecutive signals are generated that will move you from longs to shorts.
• Plots a Green Triangle for Open Long, a Green Square for Close Long, a Red Triangle for Open Short and a Red Square for Close Short.
• To do this I needed to track the sate of open deals. Could have done this with variables but thought plotting it may help, so "Deal State" plots a 1 if it's in a long, 0 if no deals are open and -1 if it's in a short, to display.none. Enable it in Stlye Settings if you need it for testing.
• If you'd prefer that it just worked as it did before with simple Buy / Sell signals, which makes sense if you're just trading the crossover, disable the 'Generate Close Signals for Long / Short Positions' setting.
• Now that it can generate Open Long, Close Long, Open Short and Close Short signals I added a 'Long / Short Signals' section in settings, where you can specify what signals your backtester is expecting for each state.
• Moving averages are now plotted to display.none as well in case you want to see the price and the moving averages for testing. You're much better off running my other script 'Any Ribbon' on the top pane to show the moving averages ribbon, but these options enable you to show them here if you want to.
• Added the option to buy / sell based on the moving average crossing zero, thanks Bu Bader!