I have the following simple code which compiles without problems.
V1 = C;
V2 = C;
V3 = C;
V4 = C;
V5 = C;
V6 = C;
V7 = C;
VEUR = (V1+V2+V3+V4+V5+V6+V7)/7;
Plot( VEUR, "VEUR", colorWhite, stylethick |styleNoTitle );
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.