I have programmed a system that lays pendingorders ( limits ).
if i want to use this system with an ECN broker, do i modify the pending orders directly, or do i wait until it becomes a marketorder ?
Best regards: Enotrek
You modify them directly
I use the ticket returned by the OrderSend to call the OrderModify
Sorry its a bit of a slow reply!
Gee thanks for replying, though this thread was dead.
I took the safe before the unsafe, and modified them when they have become market orders.
a bit risky, yes, maybe i should change the code...
I had problems with pending orders. Specifically I got 130 errors when the future SL was too close to current market.
I then set the TP, SL after order opens. Now I just use market orders in the EA.
I believe definitely so, you can then wrap some error handling around the whole thing and send an Alert, email or whatever if the stops dont get added
WHRoeders situation where stops are too close to market will not often happen with most pending order strategies and can anyway you can check for a potential clash before placement