How to display 2 curves on the same chart with the respective correct data?

Hello,

I want to display 2 curves on the same graph.
the first is the "PPP"
the second is the "exchange rate".

The data are here
https://data.oecd.org/conversion/purchasing-power-parities-ppp.htm

I drag and dropt with the "Plot Foreign" indicator or by typing
the AFL code below .

_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); 
_SECTION_END();

TxChgJPN = Foreign("JPN" ,"JPN");
Plot(TxChgJPN ,"exchange rate",colorBlue,styleDots);

But both approaches failed manually and programmatically.

I did get 2 charts and started with Japan.
The curves are good. (see picture below)
TEST

What I don't understand is that Japan's exchange rate
has been applied to all of my tickers, in all database markets including stocks !!

What I need to do is two "PPP" and "exchange rate" curves but from each country. That is, country by country.

ex PPP JPN with JPN exchange rate (Japan)
PPP KOR with KOR exchange rate (Korea)
PPP SWE with SWE exchange rate (Sweden)
etc ....

For this I created 2 markets with tickers in them named "PPP" and "exchange rate" respectively. (see the image below) The data is good but I can't assemble them country by country.
PPP

NB: I'm a beginner and I don't understand Amibroker and AFL very well.
I think I need a code to fetch a list of ticker and then loop over that list of tickers.
Or maybe there is an easier solution without using AFL and just Amibroker with a manual solution .

Finally , I found this solution by myself to each exchange its PPP is associated with. (see code below)

_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); 
_SECTION_END();

TickerName = Name();
PPPTicker = "PPA " + TickerName ;
//_TRACE(PPPTicker);


PPP = Foreign(PPPTicker ,PPPTicker);
Plot(PPP ,PPPTicker,colorBlue,styleDots);

But I encounter another problem now...Counting the number of bars knowing that the drawn curves do not have the same lenght. The red curve has 72 points and the blue curve has 62 points.
With "Barcount" I managed to find 72 but this value does not interest me. I would like to find the number of points of the blue curve wich is 62 .