You can use "Foreign" to refer to what happens with the SP500. Ex.
BASE=Foreign("^GSPC","C",1); //^GSPC is Yahoo!'s symbol for SP500
Buy=Cross(BASE,EMA(BASE,200)); //Buy on SP500 cross above 200 EMA
Sell=Cross(EMA(BASE,200),BASE); //Sell on SP500 cross below 200 EMA
Sebastian
--- In [email protected], Nick de Peyster <nickdepeys...@...> wrote:
>
> I can't figure out how to model the following S&P 500 system in AB:
>
> BUY = If currently a SELL then buy if S&P>200 day moving average
>
>
>
>
>
>
