Posted 8/4/2010 22:56:39
|
|
|
|
| Is there an event that's triggered when a position is closed? I basically want to have a function that's called when a position is closed.
|
|
Posted 8/5/2010 22:54:20
|
|
|
|
The OrderFilled method in your symbol script will be called whenever an order is filled, and if the trade.TradeType is TradeType.ClosePosition then the position was closed.
Although if the close order was only partially filled the position might not be entirely closed. You can check the position.State to see if it is.
Thanks,
Daniel
|
|
Posted 8/9/2010 22:28:44
|
|
|
|
| That's helpful. Thank you!
|
|
|
|