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

 
Please tell me, how does the code look like, when implementing it, after a trade closed on a stop, the next one opens with an increased volume? I need it very much.
 
moloko:

Good afternoon. I am a newbie. Something strange has happened to my account. Please help me with advice.

Stop loss did not trigger in demo. The loss on the set SL should be about 50, but in fact it bit off 158. How did this happen?

The set SL does not guarantee that the loss will be closed exactly at this price.

In your case, the price seems to have jumped over your SL and another 100+ points and the order was closed at the first occurring quote.

 
vadynik:

I can not make that when you reach a loss equal to UbitokSize Martin reset lot, or rather, it resets, but then stops filling, because Delta remains with zero, and why it remains with zero I do not understand, because there is a condition Delta = 100000;

When you reach the set loss the piece starts to trigger all the time:

        if(Delta > UbitokSize)
        {         
         Lot=StartLot;         
         Delta=0;
         return(NormalizeDouble(Lot,2));
        }

If you want to restart Martin - it would be logical to add something like:

MaxBalanc = AccountBalance();
MinBalanc = AccountBalance();
 
Mr.Profit:

You have a chunk that is triggered all the time when you reach a set loss:

If you want to restart Martin - it would be logical to add something like this chunk:



Thank you, so restarts
 
moloko:

Where can I read about it please!!! I don't feel like having a real account now)

Search for the words slippage/gap/cookie. A real account is needed when you don't feel sorry for the money, it may be drained or it may just not be given back.

 
splxgf:

Search for the words slippage/gap/cookie. A real account is needed when you don't feel sorry for the money, they may drain it or they may just not give it back.

Thanks for the reply.
 
Hello. Do you know if there is an EA that cancels a pending stop order (buy-stop/sell-stop) when the price reaches a certain level? Example: I put a buy-stop at the price level of 1.300, the price moves in the range of 1.250-1.295. But when the price reaches the level of 1.240 I have to delete the order. Can this be done automatically (not manually)
 
Yerik888:
Hello. Do you know if there is an EA that cancels a pending stop order (buy-stop/sell-stop) when the price reaches a certain level? Example: I put a buy-stop at the price level of 1.300, the price moves in the range of 1.250-1.295. But when the price reaches the level of 1.240, I have to delete the order. Can this be done automatically (not manually)?
Search for Function OrderDelete()
 
borilunad:
Looking for OrderDelete() function
Thank you, borilunad.
 
borilunad:
Looking for OrderDelete() function
We cannot specify a price at which a pending order will be deleted if it reaches this price. Essentially, it is a simple manual deletion of all pending orders. When opening a pending order in metatrader, you can specify the time as the arrival of which, if the pending order has not triggered, it will be deleted automatically. Is there a feature that allows you to delete a specific pending order when a certain price level is reached? Example: I place a buy-stop at the breakout of the maximum of a 4h candle, and if the price breaks the minimum of the same candle, I need to delete the order. How can you do this automatically, writing a specific quote of the candlestick's low in a function (script), so as not to be constantly present in the terminal. Thank you in advance)