I'm about to give up fighting them already... - page 2

 

I had this error when I didn't use normalisation. I've already written about it.

 
Alexander Bereznyak:
look at the instrument properties, maybe the Stop Level is zero there, then try normalization

Yes, if the broker is A*****i, then its Stop Level is often zero. But at the same time the support team writes that we need to use 2 spreads to get the correct Stop Level. Therefore, the code which covers the largest number of cases with the Stop Level is as follows:

tickSize        = SymbolInfoDouble(symbol, SYMBOL_TRADE_TICK_SIZE);
ask             = SymbolInfoDouble(symbol, SYMBOL_ASK);
bid             = SymbolInfoDouble(symbol, SYMBOL_BID);
spread          = ask - bid;                                      // Заметьте - спред получаем не через MarketInfo, и не через SymbolInfoInteger

digits    = (int) SymbolInfoInteger(symbol, SYMBOL_DIGITS);
point     = SymbolInfoDouble(symbol, SYMBOL_POINT);
stopLevel = MarketInfo(symbol, MODE_STOPLEVEL) * point;           // До сих пор встречаются случаи, когда SymbolInfoInteger и MarketInfo выдают разные значения. MarketInfo пока ближе к истине
   
if (stopLevel == 0)
{
   if (!isECN)                                                    // isECN - признак ECN-счета, на котором Stop Level действительно равен 0
      topLevel = NormalizeDouble(2 * spread, digits);
}
else
   stopLevel = NormalizeDouble(stopLevel + tickSize, digits);     // Сознательное увеличение размера Stop Level на один тик, чтобы постоянно не натыкаться на ошибку 130.
 
Alexander Bereznyak:
Look at the tool properties, maybe the stop level is zero, then try normalisation.
The stop level there is from 20, I have a check... So it worked for me today at 10%, but damn, these errors... I don't know what's causing them... Some orders open, others don't...
 
Oksana Berenko:

I had this error when I didn't use normalisation. I've already written about it.

Added normalisation everywhere, doesn't help...
 
Get out of this kitchen...
 
Ihor Herasko:

Yes, if the broker is A*****i, then its Stop Level is often zero. But at the same time the support team writes that we need to use 2 spreads to get the correct Stop Level. Therefore the code, which covers the most cases with Stop Level, is as follows:

I will try it, thank you...
 
Andrey Khatimlianskii:
Get out of this kitchen...
So where to? It's probably the same everywhere... Forehfoy broker
 
so probably or definitely
 
Alexander Bereznyak:
so probably or definitely
Probably what? I don't get it. Oh, you mean brokers... I opened it on robot, see how it goes...
 

A piece from today's trade... All orders open according to exactly the same algorithm, i.e. conditions are always equal. Nevertheless, errors occur with enviable frequency. Everywhere we can see that the stop is always larger than the stop level, and the orders are always placed at a distance > than the stop level from the current price.

And on another broker's demo account not a single error during this time...

Reason: