
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
All iFunctions trying to access datas with a "shift" higher than 1000 returns 0, and no one bar from W1 and MN1 is accessible.
From where those limitations are coming from ? and how to bypass them ???
Thank you for your reply !
Do you really want to get value from 1000-th bar on Mothly timeframe? See -> 1000 months ~ 83 years (1000 / 12)
Or may beyou have 1000 bars history on Weekly? Let's see -> 1000 week ~ 20 years (1000 / 52).
Do you understand what you want?
I tested your code:
and what I got:
My experience is very similar. This is happening for all currency pairs and all periods:
1) I start MetaTrader and connect to the Demo account (fictive money, real data)
2) iBars("EURUSD",PERIOD_M1): 2048
3) wait 5 minutes
4) iBars("EURUSD",PERIOD_M1): 2053
5) wait 10 minutes
6) iBars("EURUSD",PERIOD_M1): 2063
7) manually browse the graph - look at the history (about 3 days back in the past)
8) iBars("EURUSD",PERIOD_M1): 6294
- MetaTrader initially loads some amount of bars (my one does 2048 - probably depends on system/hardware configuration?)
- number of loaded bars is increasing with time - it doesn't load automatically more bars in the past, just the new ones - comming with time
- manual scrolling of the graph into the past and browsing history loads the past data and increases the number of loaded bars
My calculations are based on two weeks of data in the past. It was giving me weird results all the time. Finally I found that it was because the older bars were not there. I found two ways how to "load" the bars:
1. Wait 2 weeks for bars to load with time - great for bugfixing :D
2. Manually browse the graph into history of 2 weeks - this one is very unpleasant as I do trading with many pairs
I didn't find any other way how to get the bars automatically via code. Is there any procedure which can do that? If not, would it be possible to build in some into the MetaTrader? That would be much appreciated.
MetaQuotes, any ideas?
Cheers