All,
I'd like to add an additional line of logic to my code. Basically, I'd like to include another necessary condition that must be met (along with the original conditions in the code) that BUYS when the SPY is trading above the 200 day MA and SELLS when SPY is below 200 day MA.
Can I get some help?