--- In [email protected], "Larry M Powell" <larypow...@...> wrote:
>
> I would like to chart spreads, such as QQQQ:SPY, how can this be done 
> in Amibroker?  Thanks,  Larry
>


Here's some simple code I wrote that does what you want as an indicator:

TopStock = ParamStr("Top Symbol", Name() );
BottomStock = ParamStr("Bottom Symbol", Name() );

fc = Foreign(TopStock,"C")/Foreign(BottomStock,"C");
Plot(fc,"Ratio " + TopStock + " / " + BottomStock,colorBlue,styleLine);

As far as I know, there's no way to do this by, say, plugging in the
symbol QQQQ:SPY - that will not be recognized.

Hope this helps!

Reply via email to