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
I get how that would force the terminal to create a thread, but does that force or ensure that the timeseries data is valid?
EDIT: As mentioned by @Ferhut Mutlu mentioned the data isnt always valid even when a thread has been proved to be running.
Maybe both things need to be coded? ie the code in previous page, plus a simple atr with period 1 needs to be loaded to ensure both a thread is created, AND that OHLC prices are valid.
EDIT2: And as per the ops's scenario with multiple symbols, would he need to load a new indicator for each of the symbols he is using? or does loading 1, then force the terminal to refresh the available symbols, AND create threads for those symbols that dont have any?It does happen for ask and bid. Allso there is allso mind scratching thing. If you want to get the bid value of another symbol, you will not get that because you will be able to call data based on the current symbols tick. The way is prevent that to call data every X ms possible. That way atleast you will get different ticks based on the symbols. Not all symbols creating the tick at the same time. That is another issue of MT5 :) OnTick gets updated only based on the symbol you are in. OnTimer is the best for such cross pair tick data. Then you will get the most realistic data but again. Still reason is unknown for 0.0. Not an exact explanation
thanks.
I simply solved it temporaily by NOT using iHigh or iLow
I am using
and all is working fine.I simply solved it temporaily by NOT using iHigh or iLow
I am using
and all is working fine.so you did the reporting like you did in the first page, and not getting those 0.0 values anymore?
so you did the reporting like you did in the first page, and not getting those 0.0 values anymore?
Yes as I said temporarily fix using Bid price
maybe the bug that has that affects the Ask/Bid, as @Ferhat Mutlu said, is a different bug that gives the 0.0 on the OCHL. But is good to know that Bid/Ask may not be affected as commonly as the other.
But i doubt that they will fix it any time soon, if ever, as it has been discussed over several years now.I simply solved it temporaily by NOT using iHigh or iLow
I am using
and all is working fine.The reason you are not having 0.0 because you are calling that function on every tick that you attached on current chart.
Example if you want to get bid price of GBPUSD from the EURUSD Chart. You are executing the function once EURUSD Generates the tick. Then you don't know if there was a GBPUSD Tick missed. Try to use OnTimer function and see if 0.0's aren't there as well.
IF with bid it works properly and no 0.0's generated. Then try to use the same OnTimer miliseconds for the high and lows you are calling...
i have been searching for method to cover this bug for some time, but none of the gurus have given proof that their methods work, so I have always been uncertain who to believe but I have found this in the docs. I have been watching the print out data for almost 5 mins non stop, and see not even 1 line that has 0.0. I hope the doc page help you too.
I do coding for both mt4 and mt5, and both indicators and eas. Please confirm that the example in the docs page below, at the bottom of the page will re-populate the OHCL data for current and past candles, for both ea's (in OnTick func) and indicator (in start() or OnTick()); coding AND for both MT4/5.
https://www.mql5.com/en/docs/series/copyrates
Does this issue occur with Ask and Bid, also? Or only close, open, high, low? or just the ones with i prefix?
There is no Bid/Ask with MT5.
If you talk about SymbolInfoTick() which allow to get all data about the current tick for a symbol, I never noticed it, but I can't exclude it.
It mainly happens with "foreign" symbols (the ones which are not the chart one) when you request OHLCV data. It's NORMAL behaviour of MT5.
please give search terms to use to find readings on 1) what prices this bug affects, and 2) proven methods that avoid or fix the bug.
I have idea for error correction, but at this stage is just a hypothesis. If i can see proofs of working fixes, then, I would not have to spend so much time testing my own code and hyposthese.