// string getCandleDate(int i) string getCandleDate(datetime i)
thanks for your reply i missed that one. Although this wasnt the problem. datetime is a 4byte integer same as int so i dont think it makes any difference the way i use it.
Another strange situation appears. I m following the below procedure:
1. Clear Default
2. Load USDCHF Chart, H1 on MT4
3. Load Indicator
4. Check MT4 1M candle time manually and is 21:32
on the log i get as
0 BAR:5/2/2013 10:19
Makes no sense!!!
When i repeat the above 1-3 steps procedure it brings up ther correct one!!!
Also following again 1-3 steps loading another chart (like XAUUSD) it brings again the
0 BAR:0/1/1900 0:0
Any help please on this one!?? it drives me crazy!!!
thanks for your reply i missed that one. Although this wasnt the problem. datetime is a 4byte integer same as int so i dont think it makes any difference the way i use it.
Another strange situation appears. I m following the below procedure:
1. Clear Default
2. Load USDCHF Chart, H1 on MT4
3. Load Indicator
4. Check MT4 1M candle time manually and is 21:32
on the log i get as
0 BAR:5/2/2013 10:19
Makes no sense!!!
When i repeat the above 1-3 steps procedure it brings up ther correct one!!!
Perhaps you do not have up to date data when you first request the information, then when you try again you have the data so it works as you expect, check for error 4066, if you get it try for the data again . . .
ERR_HISTORY_WILL_UPDATED | 4066 | Requested history data in updating state. |
Perhaps you do not have up to date data when you first request the information, then when you try again you have the data so it works as you expect, check for error 4066, if you get it try for the data again . . .
ERR_HISTORY_WILL_UPDATED | 4066 | Requested history data in updating state. |
thanks. that could be the reason since I ve noticed that this happens only on the first tick. aftr that it looks it works and repeats again when i m chenching TF.
does it matters that i m not using ArrayCopySeries() and i m reffering directly to M1 timeframe from a higher timeframe? Should i use ArrayCopySeries() instead?
Also will ERR_HISTORY_WILL_UPDATED work wihout ArrayCopySeries() ?
thanks. that could be the reason since I ve noticed that this happens only on the first tick. aftr that it looks it works and repeats again when i m chenching TF.
does it matters that i m not using ArrayCopySeries() and i m reffering directly to M1 timeframe from a higher timeframe? Should i use ArrayCopySeries() instead?
Also will ERR_HISTORY_WILL_UPDATED work wihout ArrayCopySeries() ?
No, No, Yes
Before your iTime() call call GetLastEror() to clear it's variable, then do your iTime() call then check GetLastError() if it's 4066 perform the iTime() call again, this can be wrapped up in a while loop. The iTime() call will initiate the data download if you don't already have it, you may want to include a short Sleep() to give the data time to arrive.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi
i ve got the following code
Now i do the following the following steps:
1. I clear the profile default folder.
2. I open the MT4 terminal and load a H1 chart. eg. USD./JPY. graph.
3. I place the indicator.
The results i m getting on the logfile the first time i m running this is
0 BAR:0/1/1900 0:0
The second time i place the indicator sometimes works, sometimes not. Also when i m switching from H1 to M30 I m again getting a totally wrong minutes number...
Any ideas?