Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1311

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
Thank you for your participation.
Unfortunately the ObjectSet*** function was not suitable for my task.
Now everything works as it should.
But in your question there are such words
Please help me with one problem!
I am just learning to write code and in this connection I ask you to be lenient to my illiteracy.
I want to help you understand theOnChartEvent function that when you change timeframe, or change settings in the indicator menu, it will update the graphical objects in the chart.
I understand that you have to delete the graphical objects first and then create them again. Butif the objects were deleted, there's no access to its properties and then how to re-create these objects....... Or maybe I don't understand it? Or maybe there is another way - updating graphical objects on the chart?
Please write an example with comments on how to do it.
And in order not to delete, just change the required object property by one of the ObjectSet*** functions .
As for deleting all objects........., you should be very careful when deleting all objects indiscriminately... Among objects on the chart, there may be objects created manually or by another Expert Advisor/indicator. If you like deleting objects, you should pay attention to removal by prefix. True, you have to create with the prefix. It is not difficult.
iSpread ?
I see that it is roughly similar to the spread value if you query for bars in Symbols/Bars in the terminal.
Of course these values do not correspond to the real values given by SYMBOL_SPREAD.
Why such a difference? And what is such an unreal spread shown usingiSpread?
What result does the function show
iSpread ?
I see that it is roughly similar to the spread value if you query for bars in Symbols/Bars in the terminal.
Of course these values do not correspond to the real values given by SYMBOL_SPREAD.
Why such a difference? And what is such an unreal spread shown usingiSpread?
Minimum spread per bar.
I added a buffer for checking - it takes data from the indicator array spread[] and displays a comment for the current bar - the result of iSpread
How to do it here:Spread Control
Greetings!
Can you tell me why variable "ATR14" doesn't change and how can I see it changing?
Greetings!
Can you tell me why the variable "ATR14" does not change? How can I see it changing?
Because in MQL5 the indicator handle (by the way, it has the int type) is created ONE time and it is done in OnInit.
And for data reception from the indicator the CopyBuffer is used.
Because in MQL5 the indicator handle (and it has the int type, by the way) is created ONE time and it is done in OnInit.
And for data reception from the indicator the CopyBuffer is used.
Ok, let's suppose.
Nothing has changed.
Greetings!
Can you tell me why variable "ATR14" does not change? And how can I see it change?
here's an exampleһttp://www.mql5.com/ru/docs/indicators/iatr
Well, let's just say
Nothing's changed.
You've almost got it. I recommend calling the array 'array_atr' instead of 'ATR14m'. Then you'll see your error in calling'Comment' sooner.
You've almost got it right. I recommend calling the array 'array_atr' instead of 'ATR14m'. Then you will see your error in the'Comment' call sooner.
You've almost got it right. I recommend calling the array 'array_atr' instead of 'ATR14m'. Then you'll see your error in calling'Comment' sooner.
Do you think that naming a child's potty a night vase will change anything?
There's such a misunderstanding there that I daren't even try to suggest something... You have to read the documentation 50 times to understand it...