StopLoss order cancellation

Questions about MultiCharts .NET and user contributed studies.
tradetree
Posts: 81
Joined: 29 Apr 2013
Location: www.threefoldmarkets.com
Has thanked: 12 times
Been thanked: 16 times
Contact:

StopLoss order cancellation

Postby tradetree » 18 Nov 2013

I have read the Programmers Guide for Stop handling and I've looked elsewhere for Stop order information and can't find information on how Stop orders are handled when a position closes? I know how to initiate a Stop order. The question is if a Stop order is automatically cancelled when the underlying position is exited, or do I manage Stop orders just like an open position? OR, as in some platforms, you have to reissue the stop order on every "CalcBar" (equivalent callback)? In some cases other platforms will cancel the Stop order if it is not resubmitted every bar.

My current guess is that I have to manage Stop orders, therefore I would enter a position, then upon having taken a position I would enter the Stop order, and upon exiting the position, if not through the Stop getting hit, I would exit the Stop. If the Stop is the method of exit, then clearly there is nothing to be done.

Out of this I would like to get the following questions addressed:
1) Do I manage my own Stop orders, both entering and exiting?
2) What is the callback method upon order execution? I noticed there is OnBrokerStrategyOrderFilled, but is that the main method or is OnBrokerPositionChange?
3) Are OCO orders related to Stop orders, such that I may use an OCO to tie a Stop to an entry?

User avatar
JoshM
Posts: 2195
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1544 times
Been thanked: 1565 times
Contact:

Re: StopLoss order cancellation

Postby JoshM » 19 Nov 2013

(..)The question is if a Stop order is automatically cancelled when the underlying position is exited, or do I manage Stop orders just like an open position? OR, as in some platforms, you have to reissue the stop order on every "CalcBar" (equivalent callback)? In some cases other platforms will cancel the Stop order if it is not resubmitted every bar.
(...)
That's right:
According to logic of EasyLanguage/PowerLanguage, an order will be maintained as long as the conditions for its generation are met on each calculation. Once a condition is not met, it will be cancelled.
Source.


Return to “MultiCharts .NET”