//Easy to do using SetForeign and RestorePriceArrays.
//Remove the a param line and writeval sections after verification that it
indeed works.
//Current symbol
a=Param("MACD Mult",1,1,1000,1);// only necessary when using Forex symbols
or small stock values to verify
//that indicator values are identical; also compare last values at RHS.
Plot(a*MACD(), WriteVal(a,1.0)+"*MACD", colorGreen);// Current symbol
Plot(a*Signal(), WriteVal(a,1.0)+"*Signal", colorRed);
//Foreign Symbol
Symbol1="EUR.USD-IDEALPRO-CASH";
SetForeign(Symbol1);//redirects to Foreign symbol
Plot(a*MACD(), WriteVal(a,1.0)+"*Other MACD", colorBlue);
Plot(a*Signal(), WriteVal(a,1.0)+"*Other Signal", colorGold);
RestorePriceArrays();// Back to normal
From: [email protected] [mailto:[email protected]] On Behalf
Of potatosoupz
Sent: Monday, November 30, 2009 9:25 PM
To: [email protected]
Subject: [amibroker] Possible to run a MACD on a foreign symbol?
I have a chart with a Price series and a Price (foreign) series. I also have
MACD within the primary symbol's pane, but when I place a MACD within the
foreign symbol's pane, it's identical to the primary symbol on the chart.
Is there a way to show a MACD (foreign) for the foreign symbol?