Errors, bugs, questions - page 1175

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
......................functions (search, calculate, etc.) generally return length/size, or -1 if unsuccessful, which makes error handling much easier.
Greetings. Any tips for newbies on what functions to use to set a common takeout on a grid of orders in the event of a reverse signal?
I'm learning file operations. Does anyone know if MQL4/5 is faster with csv or txt files?
What problems are you trying to solve by working with files?
Please give a code example of how to call a linked resource indicator from an EA, which in turn uses another linked resource indicator in itself. For example, there is an indicator A, and B is called from it. There is also expert C that uses A. What should be written in #resource and when calling iCustom in all cases?
The help is not clearly written in this regard. The usual construction in indicator A:#resource "\\Indicators\B.ex4" and theniCustom(::Indicators\B.ex4) works fine when A is launched by itself.But if A is inserted into Expert Advisor#resource "\\Indicators\A.ex4", an errorcannot load resource for the attached indicator appearsindicating some absolute wrong synthesized path that somehow mentions Libraries directory, while indicator B is searched inside itself (MQL4\Libraries\::Indicators\B.ex4::Indicators\B.ex4).
Regarding ArraySize, I raised a similar problem on MQL4 the other day: https://www.mql5.com/ru/forum/152471. As far as I understand, everything should be the same in MQL5.
Perhaps, my message has been considered there :) Concerning this problem, the Service Desk has replied that the reason was incorrect operation of the optimizer and they will change the type to uint in new builds. In fact it is uint now, but it is undocumented :) And by the way, they will change it to uint for ArrayResize too. I advised them to change it to ulong, otherwise they will have to return to this problem because of the lack of 32-bit values when storing large volumes in the nearest future.
As for the value -1 on error, there should be no problem with it because: (int)-1 = (uint)-1 = 0xFFFFFFFFFF = UINT_MAX, i.e. the bit representation is the same. Though the comparison operation will give a different result. i.e. if it was so in the code
it will become incorrect.
The total number of elements in the MQL array may not exceed INT_MAX and this will not change.
If you need arrays of larger size in an MQL program, you must create a separate class (for example, CBigArray).
Trying to master iCustom in mql5. I mastered it in mql4 :)
The problem is to draw something similar to MACD, but instead of a quick moving average the VIDYA indicator, which is in the Examples folder, should be used.
I took a standard MACD code and put parameters for VIDYA instead of the MA. The problem is that everything compiles but nothing is drawn.
I've marked two places in the code below where I've changed the standard MACD code. Otherwise everything is the same. Please tell me what else I'm missing. I'm assuming it's downstream somewhere in the code...
Первый вставленный кусок:
input int Per=7; // Per input int Per1=21; // Per1 input int Shift=0; // Shift
Конец
Второй вставленный кусок
Конец
Trying to master iCustom in mql5. In mql4 I was able to master it virtuosely :)
I don't know if this has already happened, but the question is, new bar, PLOT_EMPTY_VALUE value for the buffer is set to 0.0, but in fact there are sometimes completely different values