BuyStops Placed on Every Tick, but I want it once placed.

 

Hello everyone,

How can I limit my BuyStops placing every single tick till the order is filled?


I have a code where I have a Buy Stop placed at the high[1], and every time there is a tick I get placed another BuyStop at the same high[1]... I just want it placed once.


Thanks in advance

 
Shele: How can I limit my BuyStops placing every single tick till the order is filled?
  1. Check for an existing one, before opening a new one. When in doubt, think!

  2. There is no need to create pending orders in code.

    1. The pending has the slight advantage, A) you are closer to the top of the queue (filled quicker), B) there's no round trip network delay (filled quicker.)
    2. Don't worry about it unless you're scalping M1 or trading news.
    3. Humans can't watch the screen 24/7, so they use pending orders; EAs can, so no need for pending orders, have it wait until the market reaches the trigger price and just open an order.

Reason: