[ARCHIVE]Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Can't go anywhere without you - 5. - page 357

 
TarasBY:
The maximum (current) High[0] is above the MA, and consequently the minimum (current) Low[0] is below the MA (as I understand we are talking about the 0-bar).


If only it were that easy. I want it to be a touch without reference to maximum or minimum, so the program should decide if a certain number of bars have touched the moving average or not, regardless of direction. To be more precise, the body of the bar should touch the EMA. I do not know how to do it. I have looked through everything.
 
Forexman77:

If only it were that simple. I need to be able to make sure that the bar touches the EMA, not the highs or lows, so that the program can see if a certain number of bars have touched the moving bar or not, regardless of the direction of the movement. To be more precise, the body of the bar should touch the EMA. I do not know how to do it. I have looked through everything.
The candlestick's shadows are tangents (unlike Open[i]\Close[i] on opposite sides of the MA - crossing). Until you understand the physical meaning of your desires you will start digging. :)
 
TarasBY:
Candlestick shadows are tangents (as opposed to Open[i]\Close[i] on opposite sides of the MA - crossover). Until you understand the physical meaning of your desires you will dig. :)

I do understand it. That is why I am asking. I have to determine the place where bars are touching the MA and use it as a reference. If I mark it with < or >, this or that bar will surely fit the condition.
 
Dear: Somewhere on the website there was a way to change the spread when testing in the tester. Now I can't find the description of this method. If anyone remembers where there is a description of how to change the spread, write a link.
 
Sancho77:
Dear: Somewhere on the website there was a way to change the spread when testing in the tester. Now I can't find the description of this method. If anyone remembers where there is a description of how to change the spread, write a link.

Have you tried the search?

https://www.mql5.com/ru/forum/119830

 
FAQ:

Have you tried the search?

https://www.mql5.com/ru/forum/119830

Thank you!
 

I have a two-dimensional array with 3 columns. I need to leave the first (0) as it is and zero out the 2nd (1) and 3rd (2) columns.

How can I do it? - Is there some function (how to write it correctly)? Or just try to assign null values?

ArrayInitialize() I looked at, but as I understood it will zeroize everything.

 

Good afternoon everyone!

I am trying to use the function to delete ALL pending orders in the tester from Kim's functions

R = DeleteOrders( NULL,-1,-1 );
код
код
}
                                        
 return(0);
                                                        
void DeleteOrders(string sy="", int op=-1, int mn=-1) {
  int i, k=OrdersTotal(), ot;
 
  if (sy=="" || sy=="0") sy=Symbol();
  for (i=0; i<k; i++) {
    if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES)) {
      ot=OrderType();
      if (ot==OP_BUYLIMIT || ot==OP_BUYSTOP || ot==OP_SELLLIMIT || ot==OP_SELLSTOP) {
        if (OrderSymbol()==sy && (op<0 || ot==op)) {
          if (mn<0 || OrderMagicNumber()==mn) 
          {
          OrderDelete(OrderTicket(), clDelete);

When I try to compile it, I get an error saying that the ' clDelete ' variable is not defined.

'clDelete' - variable not defined C:\Program Files\Alpari NZ MT4\experts\Positive.mq4 (94, 38)

Could you please tell me how and where it should be defined?

Thank you.



 
Chiripaha:

I have a two-dimensional array with 3 columns. I need to leave the first (0) as it is and zero out the 2nd (1) and 3rd (2) columns.

How can I do it? - Is there some function (how to write it correctly)? Or just try to assign null values?

ArrayInitialize() I looked at, but as I understand it will zeroize everything.

Array overrun:

    double lda_MAS[3][];
    for (int li_IND = 1; li_IND < 3; li_IND++)
    {
        for (int li_IND1 = 0; li_IND1 < ArrayRange (lda_MAS, 1); li_IND1++)
        {lda_MAS[li_IND][li_IND1] = 0.;}
    }

- If I understand your "wants" correctly.

 
solnce600:

Good afternoon everyone!

I am trying to use the function to delete ALL pending orders in the tester from Kim's functions

When I try to compile it, I get an error saying that the ' clDelete ' variable is not defined.

'clDelete' - variable not defined C:\Program Files\Alpari NZ MT4\experts\Positive.mq4 (94, 38)

Could you please tell me how and where it should be defined?

Thank you.

This parameter is responsible for the colour of the deletion arrow https://docs.mql4.com/ru/trading/OrderDelete - You can remove it (the parameter) altogether, then the arrow will not just appear. And if you really need an arrow, you'd better reread the Types of Variables section of the book.

By the way, I'm the same not particularly sophisticated in coding (some people call it programming, not distinguishing between these concepts - but it's coding). And so did getting into reference books and looking up what these things are. Chew on reference books and textbooks more often. As a rule, most issues are covered there. - Everyone does this, even experienced ones, as you can't memorise everything. These are all reference materials.

clDelete - as you may guess, cl is colour, Delete is deletion. The colour of deletion.

Reason: