Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 583

 
AlexeyVik:
And then how do we figure out which value to use?

Or did you mean to declare an array? Then int N[6] = {1, 2, 5, 9, 15, 19};

I don't use such arrays, if I've made a mistake, please let somebody correct me...



Arrays are not suitable. The values of array elements are accessed element by element, i.e. you can access only one of the elements at a time.

 

Inthe tester it is necessary to limit trading on certain days of the month. How can we make the days of the month simple and easy to change?

 
abeiks:

Inthe tester it is necessary to limit trading on certain days of the month. How can we make the days of the month simple and easy to change?


https://docs.mql4.com/ru/constants/structures/mqldatetime
 
Hello, can you help me to update my EA so that it works on a martingale basis, i.e. after a losing trade the lot is doubled.
Files:
test3.mq4  7 kb
 
abeiks:

int N[5] = {1, 2, 5, 9, 15, 19} - too many initializers

int N[6] = {1, 2, 5, 9, 15, 19};

N[0] =1

N[1] = 2

N[2] = 5

N[3] = 9

N[4] = 15

N[5] = 19

 
Could you please tell me how to write the code correctly in the board, for example, if you open Buy and Sell and need to open another Buy.
 
Pro, can you tell me how to set a checkbox in the indicator parameters, so that if the indicator has a checkbox - read one, not the other. Thank you...
 
kon12:
Pro, can you tell me how to set a check box in the indicator parameters, so that if the indicator has a check box in the menu - count one, not - another. Thank you...


extern bool   флажок=True;
int считаем;
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
   if(флажок)
      считаем=1+2;
   else
      считаем=1-2;
  }
//+------------------------------------------------------------------+
 
r772ra:
THANK YOU! Only it turns out you have to select true-false in the indicator parameters, but is it possible to get the check box in the parameters as a tick box that you put in or take out. Needed for tablet
Reason: