Errors, bugs, questions - page 1400

 

After upgrading to the new build(1178), when loading the EA on the chart, I get the following error in the log with the unloading of the program from the chart:

2015.10.14 21:04:50.571 TestLibrary (EURUSD,M30)        
2015.10.14 21:04:50.571 TestLibrary (EURUSD,M30)        00: 0x00000000028E1F21
2015.10.14 21:04:50.571 TestLibrary (EURUSD,M30)        
2015.10.14 21:04:50.571 TestLibrary (EURUSD,M30)                      00000000028 E1F37 C6467000          mov        byte [rsi+0x70], 0x0
2015.10.14 21:04:50.571 TestLibrary (EURUSD,M30)                      00000000028 E1F30 C686AD02000000    mov        byte [rsi+0x2ad], 0x0
2015.10.14 21:04:50.571 TestLibrary (EURUSD,M30)        
2015.10.14 21:04:50.571 TestLibrary (EURUSD,M30)                      00000000028 E1F2E 7 CA0              jl         0x28e1ed0
2015.10.14 21:04:50.571 TestLibrary (EURUSD,M30)                      00000000028 E1F2C 39 C3              cmp        ebx, eax
2015.10.14 21:04:50.571 TestLibrary (EURUSD,M30)                      00000000028 E1F26 8 B868B000000      mov        eax, [rsi+0x8b]
2015.10.14 21:04:50.571 TestLibrary (EURUSD,M30)                      00000000028 E1F24 FFC3              inc        ebx
2015.10.14 21:04:50.571 TestLibrary (EURUSD,M30)           crash -->  00000000028 E1F21 FF5728            call       qword near [rdi+0x28]
2015.10.14 21:04:50.571 TestLibrary (EURUSD,M30)        Access violation at 0x00000000028E1F21 read to 0x0000000D5D01E928 in 'D:\#MetaTrader\MetaTrader 5 Test\MQL5\Experts\#TestLibrary\Article02\TestLibrary.ex5'

//---

As far as I understood, this situation occurs when trying to hide graphical objects usingCChartObject::Timeframes(OBJ_NO_PERIODS) method.

P.S. Although no, the problem is most likely due to some other reason. Trying to localize, will continue in servicedesk, opened an application.

 
transcendreamer:
the author is already aware of this and is thinking hard about how it could have happened

the author has thought hard and fixed this point, it will appear in the next update

the fault was an unrecorded feature of the broker

 
build 1178. Compilation error:'B' - template mismatch
class A { template<typename T> A( T ) {} };
class B;
class B {};
Everything was fine before
 
A100:
build 1178. Compilation error:'B' - template mismatch
but it was fine before
Thank you, we will check it out.
 
Why is the OnTimer event not triggered in indicators called via iCustom?
 
Ilya Malev:
Why OnTimer event is not triggered in indicators, called through iCustom?
Architecturally the timer event is a chart event, therefore in this case indicators cannot receive it.
 
Anton:
Architecturally the timer event is a chart event, therefore in this case indicators cannot receive it.
How can I programmatically make the indicator, called via iCustom, draw (i.e. provoke OnCalculate call), in case of ticks absence (e.g. on weekend)?
 
If this indicator in turn calls other indicators, then at the first automatic call of OnCalculate right after leaving OnInit these indicators' data will not be calculated, and moreover, the indicator can't "wait" for their calculation without exiting OnCalculate. And there will be no next call of OnCalculate until the end of the weekend, when the first ticks begin. In this case neither OnTimer, nor OnChartEvent work in this indicator to call repaint when the data is received. In the end, the only way I can see - through DLL to call "Refresh" in the chart from the context menu of the window - I don't think the developers planned this method for the normal work of indicators in MT5. Otherwise, the user will have to press this button until the indicator is rendered, which will hardly make him happy.
 
Ilya Malev:
If this indicator in turn calls other indicators, then at the first automatic call of OnCalculate right after leaving OnInit, the data of these indicators won't be calculated, and moreover, the indicator won't be able to "wait" for their calculation without exiting OnCalculate. And there will be no next call of OnCalculate until the end of the weekend, when the first ticks begin. In this case neither OnTimer, nor OnChartEvent work in this indicator to call repaint when the data is received. In the end, the only way I can see - through DLL to call "Refresh" in the chart from the context menu of the window - I don't think the developers planned this method for the normal work of indicators in MT5. Otherwise, the user will have to wait in front of the chart pressing this button until the indicator is rendered, which will hardly make him happy.

If for MT4:

this will not work? https://www.mql5.com/ru/code/11678

ChartRefresh
ChartRefresh
  • votes: 11
  • 2014.08.13
  • Alexandr Bryzgalov
  • www.mql5.com
Скрипт для принудительно обновления текущего графика.
 
Alexandr Bryzgalov:
it doesn't work like this? https://www.mql5.com/ru/code/11678

This script is for MetaTrader 4 :)

In MT4 just all the data is calculated by the terminal before it is received in mql4 programs

Reason: