I have the following simple code which compiles without problems.
_SECTION_BEGIN("ValueEUR");
SetForeign("EURUSD");
V1 = C;
SetForeign("EURCAD");
V2 = C;
SetForeign("EURGBP");
V3 = C;
SetForeign("EURCHF");
V4 = C;
SetForeign("EURNZD");
V5 = C;
SetForeign("EURAUD");
V6 = C;
SetForeign("EURJPY");
V7 = C;
VEUR = (V1+V2+V3+V4+V5+V6+V7)/7;
Plot( VEUR, "VEUR", colorWhite, stylethick |styleNoTitle );
_SECTION_END();
It is supposed to run as subchart under whatever other chart.
I'm connected to Interactive Brokers, so the data should be available.
But instead of the expected result it simply draws a linechart
of the mainchart to which the code was associated...
Thank you very much for your answer.
I changed all the symbols and all seemed to work out fine,
but the result doesn't correspond to the result I got with my original
script in easylanguage. It should be 18.xx actually, because the
average rises as the EURJPY is at 124.xx actually...
while I obtain now 0.169xx

Ok, I found the problem, as it seemed to exclude the JPY as it was not
integrated in my amibroker database, but I thought that this would not be necessary
with 'foreign' as my aim was to establish the same chart also with the
other 7 currencies to compare their relative strength, but without
integrating all the details in my amibroker database.
So doesn't it work like I expected with 'foreign' ?

You need to add symbols to DB first.
Foreign calls existing symbols data of DB. It is does not create/add symbols.
Please read documentation.
Nowhere is it said that Foreign() function creates symbols.
