I am looking for a way to add to my script where
it continues on to the "buy" code only if the
current price of the SPY ETF is above its 200 day MA.
The strategy is that I do not want
to buy if the whole market is down.
Thank you.
Size:
Color:
Take a look in the WealthScript Programming Guide, DataSeries > Accessing Secondary Symbols > How to: Access DataSeries of Secondary Symbols.
After creating that series for SPY, refer to it in your Strategy like as with any normal DataSeries.
Size:
Color: