Code: Select all
m_EnterLongStop = OrderCreator.Stop( new SOrderParameters(Contracts.Default, "LongStop", EOrderAction.Buy ));
Code: Select all
m_EnterLongStop.Send( entryPrice );
Code: Select all
m_EnterLongStop = OrderCreator.Stop( new SOrderParameters(Contracts.Default, "LongStop", EOrderAction.Buy ));
Code: Select all
m_EnterLongStop.Send( entryPrice );
FYI, if you change your mind at a later point and want to use something else than CancelOrder, you can also cancel pending orders by not resubmitting then.If I do not hit the stop under the conditions I have set I want to cancel the m_EnterLongStop. I have searched and found some references to CancelOrder, but no code example for how to invoke it. Can you share an example for my simple situation? And please note that I don't want to do something else, like wait for the conditions and enter a market order. I want the stop order at my price and then cancel the stop order if I no longer need it.
An order is executed at the point specified by the parameters; if the order is not filled within the specified bar, the order is cancelled.