Imported from previous forum
I am interested in submitting a new order request that also contains information for setting a stop loss and a take profit. From the research I have done, it appears that the FIX protocol requires multiple messages to accomplish submitting a new order with stop loss and take profit.
The issue with submitting multiple messages is that it does not provide the ability to atomically open a position with either a stop loss or take profit (or both) in place. In the time between the new order request and subsequent modifications to apply a stop loss and/or take profit, desired price levels may have been broken/reached.
Please advise on the best practice for creating new order requests that also allow stop loss and/or take profit to be specified.
[ original email was from John Harris - john.harris@bondmart.com ]
Michael,
What you are describing is not a single but a multi-leg order. A “stop loss” (which is a misnomer) is itself an order. If you open a position with a purchase, your so-called stop loss would be a sale. If the stop order is triggered, you would have effected two transactions.
Please note that there is no way to fix your loss or profit on any position. When triggered, a stop order becomes a market order. It will be executed, but not at a price known in advance. A stop limit may not be executed at all.
Since you ask about best practice, my advice is: do not use stop orders, period. Watch your positions and exit them when you are no longer comfortable with the risk they bear.
Best,
John
I am interested in submitting a new order request that also contains information for setting a stop loss and a take profit. From the research I have done, it appears that the FIX protocol requires multiple messages to accomplish submitting a new order with stop loss and take profit.
The issue with submitting multiple messages is that it does not provide the ability to atomically open a position with either a stop loss or take profit (or both) in place. In the time between the new order request and subsequent modifications to apply a stop loss and/or take profit, desired price levels may have been broken/reached.
Please advise on the best practice for creating new order requests that also allow stop loss and/or take profit to be specified.
A stop loss order is a single message and the order would be inactive until StopPx is reached. A take profit would be a pegged order with a trailing stop price that gets adjusted as the market price goes up (it can never go down and then becomes your stop trigger to take the profit). Pegged orders are also a single message.
Why would you need to define both in a single order? Assuming a market price of 100 and your desire to stop a loss at 95 and take a profit at 105. Why can’t you enter a trailing stop order for 100 with an offset of 5? The lowest stop trigger would be 95 and increase as the price goes up. You could reduce the offset as you approach 105 to avoid having to go way over 105 until the trailing stop is triggered. But that increases the risk of selling below 105 as the price fluctuates.
Maybe it is better to use NewOrderList with 1385 ContingencyType = 1 = “One cancels the other”. Put two inactive orders in the list, one with a TriggeringInstruction (or simply use StopPx) to sell at 95, another to sell at 105. If one gets triggered and executed, the other gets cancelled.
You did not mention the FIX version, so I assumed the “latest and the greatest available” ![]()
I am interested in submitting a new order request that also contains information for setting a stop loss and a take profit. From the research I have done, it appears that the FIX protocol requires multiple messages to accomplish submitting a new order with stop loss and take profit.
The issue with submitting multiple messages is that it does not provide the ability to atomically open a position with either a stop loss or take profit (or both) in place. In the time between the new order request and subsequent modifications to apply a stop loss and/or take profit, desired price levels may have been broken/reached.
Please advise on the best practice for creating new order requests that also allow stop loss and/or take profit to be specified.
[ original email was from John Harris - john.harris@bondmart.com ]
Hanno,
It is important to note that under the scenario you describe, the long position assumed at 100 may not be offset under either contingency. The market is perfectly capable of trading through either limit, resulting in no execution whatsoever.
Best,
John
A stop loss order is a single message and the order would be inactive until StopPx is reached. A take profit would be a pegged order with a trailing stop price that gets adjusted as the market price goes up (it can never go down and then becomes your stop trigger to take the profit). Pegged orders are also a single message.
Why would you need to define both in a single order? Assuming a market price of 100 and your desire to stop a loss at 95 and take a profit at 105. Why can’t you enter a trailing stop order for 100 with an offset of 5? The lowest stop trigger would be 95 and increase as the price goes up. You could reduce the offset as you approach 105 to avoid having to go way over 105 until the trailing stop is triggered. But that increases the risk of selling below 105 as the price fluctuates.
Maybe it is better to use NewOrderList with 1385 ContingencyType = 1 = “One cancels the other”. Put two inactive orders in the list, one with a TriggeringInstruction (or simply use StopPx) to sell at 95, another to sell at 105. If one gets triggered and executed, the other gets cancelled.
You did not mention the FIX version, so I assumed the “latest and the greatest available”I am interested in submitting a new order request that also contains information for setting a stop loss and a take profit. From the research I have done, it appears that the FIX protocol requires multiple messages to accomplish submitting a new order with stop loss and take profit.
The issue with submitting multiple messages is that it does not provide the ability to atomically open a position with either a stop loss or take profit (or both) in place. In the time between the new order request and subsequent modifications to apply a stop loss and/or take profit, desired price levels may have been broken/reached.
Please advise on the best practice for creating new order requests that also allow stop loss and/or take profit to be specified.
John,
wouldn’t one of the two stop orders in NewOrderList be triggered, becoming a market order, as soon as the upper or lower limit is traded through?
Thanks,
Hanno.
Hanno,
It is important to note that under the scenario you describe, the long position assumed at 100 may not be offset under either contingency. The market is perfectly capable of trading through either limit, resulting in no execution whatsoever.
Best,
John
[ original email was from John Harris - john.harris@bondmart.com ]
Neither would be triggered as a market order, at least to the extent I correctly understood your post, Hanno. I understood that you were describing stop limit orders, which become limit orders when triggered (and therefore may not be executed at all). But pure stops, which when triggered become market orders, provide no assurance as to price of execution (though do provide assurance of execution at some price).
John,
wouldn’t one of the two stop orders in NewOrderList be triggered, becoming a market order, as soon as the upper or lower limit is traded through?
Thanks,
Hanno.Hanno,
It is important to note that under the scenario you describe, the long position assumed at 100 may not be offset under either contingency. The market is perfectly capable of trading through either limit, resulting in no execution whatsoever.
Best,
John
Agree, I was not specific about stop limit or stop market. The plain vanilla case would be for both orders to have OrdType=3=Stop and StopPx=95/105, resulting in market orders that would execute at the next available price AFTER the price at which the 95/105 was traded through. That price could be different, absolutely true, and worst case, trading stops after the trigger and you have no execution at all. The latter will not really happen but it should be understood that stop orders do not guarantee execution, they merely save you the effort to monitor prices and are the fastest way to get into the market as soon as a specific price level is reached, as you are already on the back end system with your order.
Neither would be triggered as a market order, at least to the extent I correctly understood your post, Hanno. I understood that you were describing stop limit orders, which become limit orders when triggered (and therefore may not be executed at all). But pure stops, which when triggered become market orders, provide no assurance as to price of execution (though do provide assurance of execution at some price).
John,
wouldn’t one of the two stop orders in NewOrderList be triggered, becoming a market order, as soon as the upper or lower limit is traded through?
Thanks,
Hanno.Hanno,
It is important to note that under the scenario you describe, the long position assumed at 100 may not be offset under either contingency. The market is perfectly capable of trading through either limit, resulting in no execution whatsoever.
Best,
John
[ original email was from John Harris - john.harris@bondmart.com ]
Thanks, Hanno - agreed.
Agree, I was not specific about stop limit or stop market. The plain vanilla case would be for both orders to have OrdType=3=Stop and StopPx=95/105, resulting in market orders that would execute at the next available price AFTER the price at which the 95/105 was traded through. That price could be different, absolutely true, and worst case, trading stops after the trigger and you have no execution at all. The latter will not really happen but it should be understood that stop orders do not guarantee execution, they merely save you the effort to monitor prices and are the fastest way to get into the market as soon as a specific price level is reached, as you are already on the back end system with your order.
Neither would be triggered as a market order, at least to the extent I correctly understood your post, Hanno. I understood that you were describing stop limit orders, which become limit orders when triggered (and therefore may not be executed at all). But pure stops, which when triggered become market orders, provide no assurance as to price of execution (though do provide assurance of execution at some price).
John,
wouldn’t one of the two stop orders in NewOrderList be triggered, becoming a market order, as soon as the upper or lower limit is traded through?
Thanks,
Hanno.Hanno,
It is important to note that under the scenario you describe, the long position assumed at 100 may not be offset under either contingency. The market is perfectly capable of trading through either limit, resulting in no execution whatsoever.
Best,
John
Thank you to all that replied in such a prompt manner. Your commentary has given me the necessary information to move forwards.
Michael
Thanks, Hanno - agreed.
Agree, I was not specific about stop limit or stop market. The plain vanilla case would be for both orders to have OrdType=3=Stop and StopPx=95/105, resulting in market orders that would execute at the next available price AFTER the price at which the 95/105 was traded through. That price could be different, absolutely true, and worst case, trading stops after the trigger and you have no execution at all. The latter will not really happen but it should be understood that stop orders do not guarantee execution, they merely save you the effort to monitor prices and are the fastest way to get into the market as soon as a specific price level is reached, as you are already on the back end system with your order.
Neither would be triggered as a market order, at least to the extent I correctly understood your post, Hanno. I understood that you were describing stop limit orders, which become limit orders when triggered (and therefore may not be executed at all). But pure stops, which when triggered become market orders, provide no assurance as to price of execution (though do provide assurance of execution at some price).
John,
wouldn’t one of the two stop orders in NewOrderList be triggered, becoming a market order, as soon as the upper or lower limit is traded through?
Thanks,
Hanno.Hanno,
It is important to note that under the scenario you describe, the long position assumed at 100 may not be offset under either contingency. The market is perfectly capable of trading through either limit, resulting in no execution whatsoever.
Best,
John