Errors, bugs, questions - page 1787

 
fxsaber:
It would even be logical to add the number of the tick in the current queue.

Then I write directly to ServiceDesk#1666680

Please consider changing the way the function works

bool SymbolInfoTick( string symbol, MqlTick& tick );

so that in Indicators (including OnCalculate body) it would return current prices according to its description

at the same time supplementing the language with the function

bool SymbolInfoTick_OnCalculate( string& symbol, MqlTick& tick ); //(*)

which would return the symbol and tick that caused the OnCalculate call to the OnCalculate function

or as an alternative (*): you can add these parameters to OnCalculate call.

OnCalculate( ..., const string& symbol, const MqlTick& tick );
 

I have a question: can you use mql5 tools to identify all running programs on charts and their names? In particular, how can I get the names of all indicators on the current chart?

 
Alexey Kozitsyn:

I have a question: can you use mql5 tools to identify all running programs on charts and their names? In particular, how can I get the names of all indicators on the current chart?

https://www.mql5.com/ru/docs/chart_operations/chartindicatorstotal

https://www.mql5.com/ru/docs/chart_operations/chartindicatorname

https://www.mql5.com/ru/docs/chart_operations/chartgetstring

https://www.mql5.com/ru/docs/constants/chartconstants/enum_chart_property#enum_chart_property_string
Документация по MQL5: Операции с графиками / ChartIndicatorName
Документация по MQL5: Операции с графиками / ChartIndicatorName
  • www.mql5.com
Операции с графиками / ChartIndicatorName - справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
 

Please advise, if in the MT4 Expert Advisor you call in series a custom indicator which has more than one chart buffer, the recalculation is performed at each call or all buffers are calculated at once and you can apply to the indicator in the code many times and not expect that there will be a waste of resources. Another interesting question is what will happen if the code doesn't stop executing (runs longer than a tick) but the indicator value changes.

 
A100:

Then I write directly to ServiceDesk#1666680

Please consider changing the way the function works

bool SymbolInfoTick( string symbol, MqlTick& tick );

so that in Indicators (including OnCalculate body) it would return current prices according to its description

at the same time supplementing the language with the function

bool SymbolInfoTick_OnCalculate( string& symbol, MqlTick& tick ); //(*)

which would return the symbol and tick that caused the OnCalculate call to the OnCalculate function

or as an alternative (*) : add these parameters to the call to OnCalculate

OnCalculate( ..., const string& symbol, const MqlTick& tick );
I join to this obvious insolence! ))
 
Alexey Kozitsyn:
This is very little. Measure for several hours. On several instruments.
Opa
Test_SymbolInfoTcick (Si-3.17,M1)       OnCalculate: ОШИБКА ПОСЛЕДОВАТЕЛЬНОСТИ! SymbolInfoTick() вернуло не последнее значение!
Test_SymbolInfoTcick (Si-3.17,M1)       OnCalculate: Текущее время мс = 1486493406313 (2017.02.07 18:50:06), предыдущее = 1486493406315
Test_SymbolInfoTcick (Si-3.17,M1)       OnTick: ОШИБКА ПОСЛЕДОВАТЕЛЬНОСТИ! SymbolInfoTick() вернуло не последнее значение!
Test_SymbolInfoTcick (Si-3.17,M1)       OnTick: Текущее время мс = 1486493406313 (2017.02.07 18:50:06), предыдущее = 1486493406315
Test_SymbolInfoTcick (Si-3.17,M1)       OnCalculate: ОШИБКА ПОСЛЕДОВАТЕЛЬНОСТИ! SymbolInfoTick() вернуло не последнее значение!
Test_SymbolInfoTcick (Si-3.17,M1)       OnCalculate: Текущее время мс = 1486495281212 (2017.02.07 19:21:21), предыдущее = 1486495281213
Test_SymbolInfoTcick (Si-3.17,M1)       OnTick: ОШИБКА ПОСЛЕДОВАТЕЛЬНОСТИ! SymbolInfoTick() вернуло не последнее значение!
Test_SymbolInfoTcick (Si-3.17,M1)       OnTick: Текущее время мс = 1486495281212 (2017.02.07 19:21:21), предыдущее = 1486495281213
Problems in OnTick as well. According to log over several hours , OnCalculate has problems three times more often than OnTick. The OnTick problem is always repeated on OnCalculate, but not vice versa.
 
fxsaber:
Oops
Problems in OnTick too. According to log from several hours, OnCalculate has problems three times more often than OnTick. At the same time OnTick-problem always repeats on OnCalculate too, but not vice versa.
It turns out that SymbolInfoTick() is asynchronous...
 
-Aleks-:

Please advise, if in the MT4 Expert Advisor you call in series a custom indicator which has more than one chart buffer, the recalculation is performed at each call or all buffers are calculated at once and you can apply to the indicator in the code many times and not expect that there will be a waste of resources. Another interesting question is what will happen if the code doesn't stop executing (runs longer than a tick) but the indicator value changes.

All buffers are calculated at once. Quietly interrogate the indicator values - there will be no recalculation

In MT4 the indicator, called from the Expert Advisor, works in the flow of this very Expert Advisor and on a copy of its historical data. You can loop the Expert Advisor, but at the same time you will receive the indicator data calculated at the time of OnTick call. Until you call RefreshRates. RefreshRates updates historical data of the Expert Advisor, after that all its data will be recalculated at the first call of the indicator
 
Slawa:
All buffers are calculated at once. Quietly call the values of the indicator - there will be no recalculation

In MT4 the indicator called from the Expert Advisor works in the flow of this very Expert Advisor and on a copy of its historical data. You can loop the Expert Advisor, but at the same time you will receive the indicator data calculated at the time of OnTick call. Until you call RefreshRates. RefreshRates updates history data of the Expert Advisor, after that all its data will be recalculated at the first call of the indicator

Thanks for the reply!

Earlier I was also interested in the ZigZag indicator blinking in MT5 (no such effect in MT4) - very annoying - what is it about?

Reason: