Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1281
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
After MT5 the feeling of MT4 is just awful.
Nikolay, there is a question about OnCalculate operation in MT5.
When you start the indicator, is OnCalculate called once after OnInit? Or the indicator waits for the tick?
Can you please explain in plain language what the difference between these functions is?
Could you please explain in plain language what is the difference between these functions?
If we call the first function with the -1 parameter, it will return the number of all orders in the terminal by the current symbol (regardless of their type).
The second function will only return the number of orders whose type is passed to it as a parameter.
Please tell me in plain language what is the difference between these functions?
Nothing, but I would use the second one, but with insertion:||Order_Type==-1
There seems to be no difference visually. Except for incomprehensible: || Order_Type ==-1.
If we set -1 in the parameter, we will take into account Buy and Sell, which is quite logical for the function to be universal
If we set -1 in the parameter, we take into account Buy and Sell, which is quite logical for the versatility of the function
Ahhhh, I see, thank you.
None, but I would use the second one, but with insertion:||Order_Type==-1
If we set -1 in the parameter, we take into account Buy and Sell, which makes sense for the versatility of the function
Thank you, I got it!
Nikolay, there is a question about OnCalculate in MT5.
When the indicator starts, is OnCalculate called once after OnInit? Or the indicator waits for the tick?
After OnInit is called once, after it waits for tick.
Thank you, I have a strange indicator that works on four without any problems. On pairs where there is no tick it did not draw.
Although, prints OnCalculate at start. Perhaps the chart needs to be updated? ChartRedraw? Because it only draws when a tick comes.Thank you, my indicator, which works on four without any problems, behaved strangely. On pairs where there is no tick it did not draw.
I suggest you actively use the regular debug.
You know, just like you have a terrible feeling about MT4, I'm trying to use MT5 with a feeling of internal rejection, and it's boiling inside , so there's no time for debugging