Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1306
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
Please help, I added one more buffer to the indicator (double ma_buffer_stop[];), but it doesn't draw or give errors(
Check, are we even getting in here?
that's just the first thing that comes to mind.Sometimes I catch the division at zero. (Anything can happen in the dynamics).
I look for it by commenting on division operations and throwing the EA on the chart.
Is there any way to get the string with the error using more normal methods?
The problem is that the error occurs only in a certain state. I.e., the error may disappear at a certain timeframe and with a new candle. It is good when you notice it at 4 o'clock. There is time to find it.
Is there any way to get the line with the error using more conventional methods?
You should have an entry in the expert log with the file and line number where division by zero took place
You should have a record in your Expert Advisor log with the file and line number where division by zero took place
2020.11.27 11:55:29.795 qstr7_52_1 EURUSD,H4: zero divide in 'qstr7_52_1.mq4' (962,43)
Only this.
962.43 though.
There you go))) Thanks!!!!!
Are we even getting in here?
just off the top of my head.Going to
If I do this, it draws
This array only has the right values at the intersection points, elsewhere its value is EMPTY_VALUE. Therefore, nothing is visible. You need to enter a global variable and assign values to it at the moment of intersection. And it will already give the current value at the moment of intersection, or the past value when there is no intersection.
This array only has the right values at the intersection points, elsewhere its value is EMPTY_VALUE. Therefore, nothing is visible. You need to enter a global variable and assign values to it at the moment of intersection. And it will already give the current value at the moment of intersection, or the past value when there is no intersection.
Thank you, it worked)
This array only has the right values at the intersection points, elsewhere its value is EMPTY_VALUE. Therefore, nothing is visible. You need to enter a global variable and assign values to it at the moment of intersection. And it will already give the current value at the moment of intersection, or the past value when there is no intersection.
I multiplied PeriodMaSlow by 2
and the initial code works without errors