Is Nobady in trouble?
So, I change my form of question.
If the current chart is EUR/USD,
and if I want to get rates_total of USD/JPY,
how can I get it?
Is Nobady in trouble?
So, I change my form of question.
If the current chart is EUR/USD,
and if I want to get rates_total of USD/JPY,
how can I get it?
If you wanted to get bars count of USDJPY PERIOD_M1 (for example) you should use Bars("USDJPY",PERIOD_M1). If you wanted to get rates, you should use CopyRates function or you can get calculated data of any indicator using CopyBuffer function (in this way you should create a handle to this indicator before).
What for you want to get rates_total of USDJPY when current symbol of your indicator is EURUSD?
If you want to build muti-currency indicator please read this article.
Thanks for your reply, alexvd.
Surely I want to build somthing like muti-currency indicator.
But I want to use Technical Indicator Functions like iRSI() or iMACD() or iStochastic() etc...
All these Functions return only the handle of a specified technical indicator.
And if you want to check whether the handle is available or not, you need to compare a return value of BarsCalculated(handle) with "rates_total".
//--- check if all data calculated if(BarsCalculated(handle)<rates_total) return(0);
This check is showed in Example of MQL5 Reference / Timeseries and Indicators Access / CopyBuffer.
But this example is single-symbol indicator.
If the current chart is EURUSD and if I get a handle like this:
ExtRSIHandle=iRSI("USDJPY",_Period,14,PRICE_CLOSE);
this case, what should I compare the return value of BarsCalculated(ExtRSIHandle) with?
"rates_total" isn't it, because "rates_total" is number of bars count of EURUSD.
Bars("USDJPY",_Period) isn't it, because Bars("USDJPY",_Period) is number of bars count in the history.
SeriesInfoInteger("USDJPY",_Period,SERIES_BARS_COUNT) should be it, I guess...but, this may not be it.
Thank you, Micky, for your report.
Fixed
Thank you, Micky, for your report.
Fixed
Really?
So I'll wait for update.
Thank you.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I made a simple test indicator for printing the number of bars.
Printed results are like this.
testBars (EURJPY,M1) 00:56:09 SERIES_BARS_COUNT = 50000, Bars = 50000,
testBars (EURJPY,M1) 00:56:09 rates_total = 50004, prev_calculated = 50003.
testBars (EURJPY,M1) 00:56:09 SERIES_FIRSTDATE = 2010.05.26 15:29:00, time[0] = 2010.05.26 15:29:00,
testBars (EURJPY,M1) 00:56:09 SERIES_LASTBAR_DATE = 2010.07.14 17:56:00, time[rates_total-1] = 2010.07.14 17:56:00.
SERIES_BARS_COUNT is always equal to Bars.
Is it really correct?
I think SERIES_BARS_COUNT should be equal to rates_total...