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

 
Andrey Khatimlianskii:

You can't trade on the brink of a stop lever in a fast market. It's like trying to open on an Instant Execution with a 1 pip slippage on a five digit market - 90% of the time there will be a requote.

Add some backlash.

0 means that either it does not exist or it is checked on the server by an algorithm known to him alone.

And we need to count from the correct prices (do not confuse bid with ask). And SL with TP of market deals should not be checked from the opening price, but from the price at which they will trigger.

I was just thinking about it, most likely the order is not processed at the same tick, yes, and the stops are on the edge of the stop
 
Maxim Dmitrievsky:
...most likely the order did not have time to be processed on the same tick...
The error would have been different
 
Oksana Berenko:
The error would be different
I'll try widening the levels a bit, though, and see what happens )
 
Maxim Dmitrievsky:
I'll try widening the levels a bit, though, and see what happens )
Write back later, it's interesting.
 
Oksana Berenko:
Write later, it's interesting.

Increased by 5 pips - no error with stops yet, but the off-quotes remain :)

And system monitored, for fun <Failure. REMOVED.

 

If I were the broker, I would spam your EA. What is the point of modifying an order in a fraction of a second? Do you modify on every tick?

 
Oksana Berenko:
If I were the broker, I would spam your EA. What is the point of modifying an order in a fraction of a second? Does it happen on every tick?
No, not on every tick, depending on the situation, but it may happen often. This is an avid scalper. What right do I have to be banned? it's not forbidden by their charter, I'm not doing anything wrong ) they deleted the link, they say I'm messing around badly )
 

If stoploss = 0, then it's floating, just like the spread.

And as for stoploss = 2 spreads, not always. Most brokers have it written in the rules - in the news stoploss as well as spread can increase by 3 times.

i've also seen similar results with my forex brokers. only there is a check for spread - and stoploss = 3 spreads and sometimes it = 50 pips.

and sometimes it is 150 pips, and sometimes ...................... 500 pips is a stop loss

I don't think you need the entire code, but the technical part of the order setting would be better.

 
Vladislav Andruschenko:

If stoploss = 0, then it's floating, just like the spread.

And as for stoploss = 2 spreads, not always. Most brokers have written in the rules - in the news stoploss as well as spread can increase by 3 times.

i've also seen similar results with my forex brokers. only there is a check for spread - and stoploss = 3 spreads and sometimes it = 50 pips.

and sometimes it is 150 pips, and sometimes ...................... 500 pips is a stop loss

I don't think you need the entire code, but the technical part of the order setting would be better.

I have already solved the problem with stoplevels, the code was in the above messages. Now there is only error Off quotes when modifying stoploss
 

Forum on trading, automated trading systems and trading strategy testing

I'm about to give up fighting them already...

Maxim Dmitrievsky, 2015.12.03 15:52

Why an error? If the stop was 20 pips... And if not 20 (changed), then all the same check

price 1.07998 SL = 1.07956 - this is a bystop, everything is ok

the second one too, and the third one...

In my code:

ValidStop = SymbolInfoInteger(Symbol(),SYMBOL_TRADE_STOPS_LEVEL);
if( Ask-iMA(NULL,0,MAperiod,0,MODE_SMA,PRICE_CLOSE,0) >= ValidStop*Point)
   {
    double price;
    Lots = LotsOptimized();
    if(ValidStop<=StopLevels) price = MarketInfo(_Symbol,MODE_ASK)+StopLevels*_Point;
    else price = MarketInfo(_Symbol,MODE_ASK)+ValidStop*_Point;
    
    if(OrderSend(Symbol

(), OP_BUYSTOP, Lots, price, 2, NormalizeDouble(iMA(NULL,0,MAperiod,0,MODE_SMA,PRICE_CLOSE,0),_Digits), 0, NULL,      OrderMagic)) GetLastError();
  }

There SL=2, how can this even work?
Reason: