I would like to get PRICE of different currency pairs

 
I have problem from MQL4
I would like to get the price of the currency pair to directly, but the price to get depends on the currency pair to be introduced. How can I get the direct price?

double USDJPY[];
ArraySetAsSeries(USDJPY,false);
int rates_usdjpy = iBars("USDJPY", PERIOD_CURRENT);
CopyClose("USDJPY", PERIOD_CURRENT, 0, rates_usdjpy, USDJPY);
pos = prev_calculated - 1;
   if(pos<=14){
      for(i=1; i<=14; i++){
         Print(TimeToString(Time[i])+Symbol()+DoubleToString(USDJPY[i]));
      }
   }
some currency pairs can get correct price but some currency pairs cant get correct price.
I dont know so why.

AUDNZD,H1: 2022.02.17 15:00 USDJPY 2147483647.00000000
GBPAUD,H1: 2022.02.17 15:00 USDJPY 114.87800000

 
  1. Kosei S: I have problem from MQL4

    Don't double post! You already had this thread open.
              General rules and best pratices of the Forum. - General - MQL5 programming forum #6 (2017)

  2. Kosei S: I would like to get the price of the currency pair to directly, but the price to get depends on the currency pair to be introduced. How can I get the direct price?

    No idea what you mean by “direct price.” There is just the current price.

    On MT4: Unless the current chart is that specific symbol(s)/TF(s) referenced, you must handle 4066/4073 errors before accessing candle/indicator values.
              Download history in MQL4 EA - MQL4 programming forum - Page 3 #26.4 (2019)

 
Your topic has been moved to the section: MQL4 e MetaTrader 4 — In the future, please consider which section is most appropriate for your query.
 
I mean I would like to get the same USDJPY price regardless of which currency pair I introduce but now I cant get price of USDJPY from AUDNZD 
 
They are the same code, but the price when I get is different depends on currency. I would like to know the reasons and solutions
 
Kosei S #:
They are the same code, but the price when I get is different depends on currency. I would like to know the reasons and solutions
Look into

MarketInfo(strSymbol,MODE_...)
 
Kosei S # but now I cant get price of USDJPY from AUDNZD 
  1. Follow #1.2

  2. Do you really expect an answer? There are no mind readers here and our crystal balls are cracked.
         How To Ask Questions The Smart Way. (2004)
              Be precise and informative about your problem

    We can't see your broken code.

    Always post all relevant code (using Code button) or attach the source file.

 
Kosei S:
I have problem from MQL4
I would like to get the price of the currency pair to directly, but the price to get depends on the currency pair to be introduced. How can I get the direct price?

some currency pairs can get correct price but some currency pairs cant get correct price.
I dont know so why.

AUDNZD,H1: 2022.02.17 15:00 USDJPY 2147483647.00000000
GBPAUD,H1: 2022.02.17 15:00 USDJPY 114.87800000

I think you want MarketInfo instead. 

Print("Market Info ",MarketInfo("USDJPY",MODE_BID));