[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 884

 
fru1t:

Good day! The question is simple: is it possible to set the second dimension of a two-dimensional array not via constant?

That is, I should do so: double massiv[5][5], but I want double massiv[5][k], where k is a known integer, defined earlier, for example, through extern int k = 5. The first dimension can be changed with ArrayResize function, but the second cannot be changed for some reason...


Since nobody answers my question, I guess that this function is simply not available in mql4? Let me clarify my question a bit: k is an external variable, declared as "extern int k=0;", i.e. I set it at program start, not before its compilation.
 
artmedia70:
Read ALL of your posts and Victor's... Something tells me you can't explain what it is you want.
Judging by this post of yours, what you need to do is this:

MagicNumber++;

But, judging by the rest of your posts, you need two different Magic. Then what's the problem? Set them rigidly for each of their two situations...
Or am I missing something, what do you need???

My goal is to learn how to create many loops in one EA. A cycle is the beginning of an action, change of an action, ending of an action.

When a signal was received, a new cycle was started. The changes and then the loop (orders) are completed.

And for this, so that each loop does not interfere with another one, I want to learn to assign each one its own Magic.

 

I realised that I hadn't communicated all the information. It's good that you say you don't get it, and it gives me a chance to convey my point even more accurately!

The change in loops will all be the same, in the sense that they will all refer to the same functions.

 
belck:

I realised that I hadn't communicated all the information. It's good that you say you don't get it, and it gives me a chance to convey my point even more accurately!

The change in loops will all be the same, in the sense that they will all refer to the same functions.

It's really hard to advise you anything due to the lack of information you've given me. I understand you will have a finite number of cycles in your EA anyway.

So as not to overdo the dynamics and end up getting bogged down in your own logic and its changes, set each loop (I have no idea what's going on in it)
a specific magician. Then it'll be easier to refer to it without additional checks to match the magician to a specific cycle (what's going on in it anyway ??? )...

 

in it takes place:

*at this point the definitions at which to average (taken from ilan)

*and all the things you need for averaging

and I want there to be no limit on introducing a simultaneous number of cycles.

If every hour there are signals for new cycles, the Expert Advisor manages to do all of them and brings them to completion - without failures and problems.

In addition, in the future, I want to specify several currency pairs in one EA and all of them will occur on these currency pairs.

)

 

The signals determined by the indicator have been brought upwards :

int start() {
   double PrevCl;
   double CurrCl;
   if (UseTrailingStop) TrailingAlls(TrailStart, TrailStop, AveragePrice); 
    
    //---- indikatori
 
Please advise how to save the ticket number in case the terminal is rebooted. Or a branch where to read.
 
valenok2003:
Please advise how to save the ticket number in case the terminal is rebooted. Or a branch where to read.

This will probably tell you! ;)

https://docs.mql4.com/ru/files/FileWriteInteger

 
Max747:

Who can tell me why when I ask the indicator for value

double vol = iCustom(Symbol(),PERIOD_H1,"Parabolic",PARASTEP,PARAMAX,0,1);

it gives me this value...

EURUSD,H1: vol= 1.2737Ask= 1.2678

and then it gives me this

EURUSD,H1: vol= 435119881.7219Ask= 1.2736

I don't understand... no calculations were done to variable vol

where are these numbers coming from? =\


No one has been able to give me an answer... Does anyone have a clue?
 
Max747:

That'll probably tell you! ;)

https://docs.mql4.com/ru/files/FileWriteInteger


Is this the only option?
Reason: