Placing "Laddered" Orders From Current Price Automatically Using Ninjascript Strategies

Hi Guys,

Consider the following scenario, with the /MES price at 5323:

Using Ninjascript, I’d like to be able to place BUY LIMIT ORDERS below the current price, at various levels. I’d also like to be able to place SELL STOP LIIMIT or SELL STOP MARKET orders above the current price, at various levels.

The desired output is something like the following, where the pink lines are sell stop limit or sell stop market orders and the blue lines are buy limit orders. The idea is to scale into long or short positions as various levels are reached.

pricegrid

I manually entered the orders in on the chart to produce this effect, but I’d like to use Ninjascript to do this. How can I accomplish this?

I seem to only be able to place one buy limit order. Do I have to use OnOrderUpdate() to wait for an accepted order status prior to submitting the successive orders?

Are you using Unmanaged mode?

No. Do I need to enable unmanaged mode for this?

You might have to go unmanaged because of restriction on the managed, recent discussion on that - An Enter() method to submit an entry order has been ignored. Please search on the term 'Internal Order Handling Rules that Reduce Unwanted Positions' in the Help Guide for detailed explanation