Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 941

 
Igor, why don't you take a break from your philosophical problems and have a look at my #9377 and see what you can recommend.
 
procom:
Igor, why don't you take a break from philosophical problems and see my #9377 and see if you can give me some advice.

Unfortunately, I don't write for MQL5, I only use ready-made examples and write them for myself, so I won't be able to help you.

Try to post it in the MQL5 branch, maybe the moderator can help you there.

https://www.mql5.com/ru/forum/6343/page1112

 
Thank you, we'll keep looking.
 
procom:
Thank you, we will be looking for it.

If you have MQL4, I can advise to use the library for transferring to MQL5. I do it that way, it is convenient and not time-consuming,

I periodically read examples of the MT5 order system, it seems to me everything is not convenient, that's why I'm not in such a hurry to get acquainted with the MT5 order system

 
Igor Makanu:

replaced for you, here is the code without the macro substitution

I don't know why you spend so much time working with multidimensional arrays if you can't understand C++ / MQL syntax and basics, you have arrays defined with one dimension and you are trying to use them with another dimension, I could be wrong of course, but this trick should not work even in Python, imho

So I can do it myself, I need it to work in a macro and specifically via transfer.

 

How does this case work?

#ifdef  identifier
   // код, находящийся здесь, компилируется, если identifier уже был определен для препроцессора в команде #define.
#endif
 
#ifndef  identifier
   // код, находящийся здесь, компилируется, если identifier в данный момент не определен командой препроцессора #define.
#endif
 
Seric29:

How does this case work?

Exactly as it is written.

 
Can you tell me where I can see an adequate fit between a news advisor and a trading advisor?
 

There is a problem:

2019.08.14 20:17:14.308 Candle EURUSD,H1: array out of range in 'Candle.mq4' (110,26)

occurs when trying to assign a buffer value via:

HighBuffer[i+StartDrawing]=High[i];

with both i , and StartDrawing equal to zero... Tried without formulas:

HighBuffer[1]=High[1];

Still writes an error... What could be the reason?

 
Yevhenii Levchenko:

There is a problem:

occurs when trying to assign a buffer value via:

with both i , and StartDrawing equal to zero... Tried without formulas:

Still writes an error... What could be the reason?

Is HighBuffer[] not zero in size?

Reason: