Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Implementing FIX Protocol-based orders with support for Stop Loss and Take Profit

I spent a substantial amount of time looking for examples or descriptions of how to implement order execution methodology that will support stop losses and take profits through FIX Protocol.

I assume that I will have to generate three orders, the main one, the SL one and the TP one. I also assume that I will have to issue the SL and TP orders after the main order has been filled. I am not sure about the order types I should use for SL and TP, and about the general execution methodology.

I'd appreciate constructive comments and directions.

Regards,

like image 342
Michal Avatar asked Oct 21 '25 03:10

Michal


1 Answers

Not really a programming question (most programmers wont even know what you talk of.

Stop loss order type is generally - STOP EXIT or whatever it is named in Fix. Profit Target will be either a MARKET IF TOUCHED order or - more normal - a LIMIT order.

Entering the SL / PT after entry is normal, though you may be able to put in the STOP LOSS at a similar time (as it can only get executed when the order is entered). The tricky thing is closing the orders without having something left over in case of trailing stops - because in fast markets you may get an exit order + the stop filled before the cancels hit.

like image 51
TomTom Avatar answered Oct 23 '25 16:10

TomTom



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!