[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 181

 
ScioMe:

The manual for OrderModify() says:

Can this error not be handled? If not handled, won't there be any problems with the dealer and trade?

You don't need to handle the error, you need to prevent it. Because your log will get clogged up with this message.
.

 
sergeev:

You don't need to handle the error, you need to prevent it. Because your log will be contaminated by this message...
.


How can you avoid it?
 
In the tester Point= 0 . Is this normal? ))))
 
ScioMe:

and how do you keep her out?

There are plenty of options. For example, you can disable the Expert Advisor, or simply close the terminal. But seriously - before sending changes, check if what you want to change has changed.
 

Thanks, I'll give it a try! There's also this problem: In Kovalev's book, in the chapter "Simple EA", there is a function New_Stop:

int New_Stop(int Parametr)                      // Проверка стоп-прик.
  {
   int Min_Dist=MarketInfo(Symb,MODE_STOPLEVEL);// Миним. дистанция
   if (Parametr < Min_Dist)                     // Если меньше допуст.
     {
      Parametr=Min_Dist;                        // Установим допуст.
      Alert("Увеличена дистанция стоп-приказа.");
     }
   return(Parametr);                            // Возврат значения
  }
I tried to use it, but the result is something strange - the unit is added, then it disappears, in short, it's a hell, and there is nothing in the code that would add a unit. No one has faced this problem?
 
ScioMe:

Thanks, I'll give it a try! There's also this problem: In Kovalev's book, in the "Simple EA" chapter, there's a New_Stop function:

I tried to use it, but the result is something strange - the unit is added, then it disappears, in short, it's a hell, and there is nothing in the code that would add a unit. No one has faced this problem?

Well, that's correct - if the stop size is less than the minimum permissible, the stop size becomes equal to the minimum permissible. The function is written correctly. It means that if you have a problem, you're simply using it incorrectly.
 
drknn:

Well that's correct - if the stop size is less than the minimum allowable, the stop size becomes equal to the minimum allowable. The function is written correctly. This means that if you have a problem, you are simply not using it correctly.

That's quite likely. The point is that the stop was changing by one, not another value. That's what seemed suspicious to me. But it could also be that it was a coincidence that the stop only changed by one.
 
Trying to figure out the colour of the order modifier.
bool Ans_Mod OrderModify(Ticket, Price, SL, TP, Green);
   if (Ans_Mod == true)
      Print("Modifyed");
Unfortunately, it doesn't draw anything, although the logbook says it does. What could be the problem?
 

Hi all!

Folks help with the modification of the order!!!!

The idea is this: open an order with a stop, after reaching the price at a certain value (say 50 points), stop also moves to a certain value (say 45 points) .... if the price has once again moved to 50 points, the order is again modify again on the value of 45 .... and so on until the triggered stop!

Help people....

 
Vovo4ka:

Hi all!

Folks help with the modification of the order!!!!

The idea is this: open an order with a stop, after reaching the price at a certain value (say 50 points), stop also moves to a certain value (say 45 points) .... if the price has once again moved to 50 points, the order is again modify again on the value of 45 .... and so on until the triggered stop!

Help people....

Post your version and people will correct you, or openly ask them to write your code for you...