Modifying OP_BUYSTOP / OP_SELLSTOP price

 

How to modify OP_BUYSTOP current price / position???

For me OrderModify is not working, don't know why... Maybe doing wrong

And on each tick deleting and creating new ticket is not very smart and cool :D 

 
   if(BSTicket != 0 && Ask < PrevAsk)
   {
      BSPrice = Ask + BuyRecoil;
      OrderDelete(BSTicket);
      BSTicket = CreateTicket(OP_BUYSTOP, BSPrice, 0, Blue);
   }

So yeah, how can I use here OrderModify, for not to each time re-create ticket?

P.S. BS means BuyStop 

 
Azael05x:

How to modify OP_BUYSTOP current price / position???

For me OrderModify is not working, don't know why... Maybe doing wrong


  1. Play video
    Please edit your post.
    For large amounts of code, attach it.

  2. OrderModify.
  3. no maybe about it. What are Function return values ? How do I use them ? - MQL4 forum Find out why and post your code.
  4. Stops and Limits are useful for humans as they can't watch the market continuously. Unnecessary for EA as you can simply wait for market to reach your trigger and then open the order.
 
Azael05x:

How to modify OP_BUYSTOP current price / position???

For me OrderModify is not working, don't know why... Maybe doing wrong

yes maybe we don't know how you tried....

where is the code ???   trying to do this....

how to do  ....

do orderloop open trades and select the buystop trade that has to change

modify that trade 

 

WHRoeder

 Stops and Limits are useful for humans as they can't watch the market continuously. Unnecessary for EA as you can simply wait for market to reach your trigger and then open the order.

if you wait for market to reach your trigger and then open the order and market is trading that moment fast great volality 

then pending trades opens more easily then your market trade that can miss that time your trigger easily

 

A pending order becomes a market order. EXACTLY the same as if you opened at the trigger. The ONLY difference is the network delay between the server to the EA and back.

That fraction of a second should be irrelevant. If that is important to you, good luck beating the spread.

 
Azael05x:

How to modify OP_BUYSTOP current price / position???

For me OrderModify is not working, don't know why... Maybe doing wrong

And on each tick deleting and creating new ticket is not very smart and cool :D 

Perhaps you should show your OrderModify() code and any code relevant to the OrderModify() such as your OrderSelect(), etc.
 
WHRoeder:

A pending order becomes a market order. EXACTLY the same as if you opened at the trigger. The ONLY difference is the network delay between the server to the EA and back.

That fraction of a second should be irrelevant. If that is important to you, good luck beating the spread.


It is not for beating the Spread it is more for dealing the requote if the internet you are using is not the fastest
Reason: