ECN broker, pending orders

To add comments, please log in or register
Enotrek
158
Enotrek  

Hi all!

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

Brian Dee - Random Trader
1758
Brian Dee - Random Trader  

You modify them directly

I use the ticket returned by the OrderSend to call the OrderModify

Sorry its a bit of a slow reply!
-BB-

Enotrek
158
Enotrek  

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...

William Roeder
20674
William Roeder  

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.

Brian Dee - Random Trader
1758
Brian Dee - Random Trader  
enotrek:

a bit risky, yes, maybe i should change the code...



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

FWIW

-BB-

To add comments, please log in or register