Errors, bugs, questions - page 2971
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
Is this the correct behaviour for the static variables?
When switching timeframes or changing parameters, their value does not change:
The result after starting the EA and switching the timeframe:
Static variablesThis is from the help:
Static variables exist at the moment of program execution and are initialized once before call of the specialized function OnInit().
So once before each call to OnInit() or once before startup, although re-initialisation is more like a second run.
Does this also happen in the tester?
Global variables behave this way too.
When switching timeframes, the Expert Advisor does not restart, it continues to work
https://www.mql5.com/ru/docs/runtime/running
При смене символа или таймфрейма графика, к которому эксперт прикреплен, выгрузка и загрузка эксперта не производится. При этом последовательно вызываются обработчики OnDeinit() на старом символе/таймфрейме и OnInit() на новом символе/таймфрейме (если они есть), значения глобальных переменных и статических переменных не сбрасываются. Все события, поступившие для эксперта до завершения инициализации (функции OnInit()), пропускаются.
When switching timeframes, the Expert Advisor does not restart, it continues to work
https://www.mql5.com/ru/docs/runtime/running
I have noticed one peculiarity that was not present in MetaTrader before. When I delete an Expert Advisor from a chart (using its context menu command), the chart closes after it. Previously, the chart did not close after deleting an Expert Advisor.
I noticed one peculiarity that was not present in MetaTrader before. When I delete an Expert Advisor from a chart (using its context menu command), the chart closes after it. Previously, the chart was not closed after deleting an Expert Advisor.
It can be programmed in the EA itself, check with another EA...
in win7 when debugging on historical data variables added to the observation do not display their values. when debugging on real data everything works.i have specified parameters for debugging in the meta-editor settings.
it turns out, that when adding variables, they are not displayed in the window immediately, but appear only when debugging is started next time, but their values are already <not implemented>. please tell me what to set to make debugging work
It may be programmed in the EA itself, check with another EA...
Indeed, threw the standard EA on the chart. Deleted it without any problems. Tried to find ChartClose in sources of my Expert Advisor. I have not found it anywhere. It was not my intention from the beginning to close the chart when deleting an Expert Advisor. I use standard UI elements, such as CAppDialog. Maybe, the closing of chart was written somewhere in standard classes...
Indeed, threw a standard EA on the chart. Deleted it without any problems. Tried to find ChartClose in sources of my Expert Advisor. I have not found it anywhere. My initial idea was not to close the chart when deleting an Expert Advisor. I use standard UI elements, such as CAppDialog. Maybe, the closing of the chart was written somewhere in standard classes...
Found it. The CAppDialog class has a CChart m_chart field.
WhenCAppDialog is deleted (its descendant is used in my Expert Advisor),the m_chart destructor will probably close the chart.
Unfortunately, this process cannot be tracked using the debugger. But after looking through the source codeof CAppDialog, as well asCChart, everything becomes clear. I draw developers' attention to this.
Found it. The CAppDialog class has CChart m_chart field.
WhenCAppDialog is removed (its descendant,CDialog, is used in my Expert Advisor),the m_chart destructor probably closes the chart.
Unfortunately, this process cannot be tracked using the debugger. But after looking through the source codeof CAppDialog, as well asCChart, everything becomes clear. I would like to draw the developers' attention to this.
Detaching from the chart, among other things.
Can you tell me why SignalBaseTotal() always returns 1000.
The mql5.com signals service has more than a thousand broadcasted signals, but the terminal has only a thousand available. Why?
Can it be that there is one set of signals in this thousand, while it can be different in an hour?Error with derived structure where no new data is added when saving/loading from file.