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
My broker adds around 5 points to each side of the spread which is displayed by the solid lines.
My code is really not the problem. I think the misunderstanding is based on my knowledge about the English language and because I know you are German I describe it in German:
Auto-translation for text above (applied by moderator) ...
My code is really not the problem. I think the misunderstanding is based on my knowledge about the English language and because I know you are German I describe it in German:
Auto-translation for text above (applied by moderator) ...
No, the Ask/Bid lines are not wrong. There may sometimes be a slight delay if the Chart thread is over-burden with many Indicators or if an Indicator is malfunctioning and slowing down the functionality.
So, it is best to make sure your Chart is clean and there is nothing causing a problem with its processing. Another issue is that and Graphical Objects you place on the chart can be processed late due to the nature of how MT5 handles these objects.
You have thus far not presented any full code example that can be tested to replicate the issue. So, please provide sample code that can be compiled and tested on our end, to either replicate the issue, or to help identify what you may be doing incorrectly.
I absolute appreciate that you all want to help me. But my code is working perfect. It’s only the part for the OnInit() and the other part must be put in OnTick(). That’s absolutely all. There is no more code. It’s only an EA to print the REAL spread. That is all it should do and it works.
And just to proof you that I am not wrong and that the bid/ask lines are NOT displaying the real spread you can see it at this screenshot.
Please have a look at the order window and its bid/ask prices. You will see that it is not identical with the built in bid/ask lines from MT5 (which are colored in red here) but they are identical with the black dotted lines which are printed by my EA using SymbolInfoDouble(_Symbol,SYMBOL_BID/ASK). Just compare the order window to the lines in the chart and you will agree with me.
I absolute appreciate that you all want to help me. But my code is working perfect. It’s only the part for the OnInit() and the other part must be put in OnTick(). That’s absolutely all. There is no more code. It’s only an EA to print the REAL spread. That is all it should do and it works.
And just to proof you that I am not wrong and that the bid/ask lines are NOT displaying the real spread you can see it at this screenshot.
Please have a look at the order window and its bid/ask prices. You will see that it is not identical with the built in bid/ask lines from MT5 (which are colored in red here) but they are identical with the black dotted lines which are printed by my EA using SymbolInfoDouble(_Symbol,SYMBOL_BID/ASK). Just compare the order window to the lines in the chart and you will agree with me.
and yet, it is wrong the chart will only ever represent the bid/ask from the broker you drawing lines on it with your code is the difference....
either you are doing it wrong, not updating the data or not redrawing the chart
no point keep showing pictures it will not help, you need to provide working code
and yet, it is wrong the chart will only ever represent the bid/ask from the broker you drawing lines on it with your code is the difference....
either you are doing it wrong, not updating the data or not redrawing the chart
no point keep showing pictures it will not help, you need to provide working code
It's really interesting that you still insist that I am wrong although you can clearly see that the values in the order window don't match with the values of the built-in bid/ask lines of MT5.
It's really interesting that you still insist that I am wrong although you can clearly see that the values in the order window don't match with the values of the built-in bid/ask lines of MT5.
the bid/ask from the chart are derived from the brokers price feed are bult in and works for everyone else.
your line objects derived from your code don't agree, why do you keep thinking it is the system that is wrong?
you have not yet provided code that shows where and when you are creating your line objects, which means the error is most likely in your coding or sequence of code
you have also not stated what other loads are on your chart/terminal which can easliy cause delays
stop assuming you are right and the problem will mostly likely appear :)