I have a question about creating a market order with a stop order in
NinjaScript, when connecting to MBTrading.
In the MBTrader API, the method to do this is:
MbtOrderClient.Submit(iBuySell VALUE_BUY, iOrderType VALUE_MARKET, double
dStopPrice, ...)
I changed the form of this method a little to make the point that the call
allows the market order to be submitted with the stop price. I like this
because it doesn't throw the ball back into my court to create a stop order
after the market order is filled. Then I don't have to worry about runaway
orders, particularly if the connection is lost between the time the market
order was created and the stop created.
I would like to code my NinjaScript order entry to take advantage of that
Submit call.
I understand that in the Managed approach, the SetStopLoss method sets the
stop loss, but that the actual order is not submitted until the entry order
executes.
In the Unmanaged approach, the process is the same, except that the programmer
explicity creates the stop order during the OnExecution response to create the
market order.
If I have my facts right so far, could I ask: is there a way to program my
NinjaScript to have it call the Submit at the MBT layer, with both the market
price and the stop?
Thanks for the help, Brian Warren
Comment