Place Order
Last updated
Last updated
This command will place orders, place orders that initiate a NinjaTrader , or place orders that are applied to an active NinjaTrader position ATM Strategy.
Providing the optional strategy name field with a valid ATM Strategy template name will result in execution of that ATM Strategy once the order is partially or completely filled. Pass in an optional unique string value for the strategy ID in order to reference that ATM Strategy via other commands.
To apply an order to an active ATM Strategy (existing strategies Stop Loss and Profit Target orders are amended) pass in the active strategy ID value and leave the strategy name field blank.
Pass in an optional unique string value for the order ID in order to reference that order via other commands. If specifying an ATM Strategy template name, there is no need to pass in an order ID as the strategy based orders can be referenced by their internally generated names such as TARGET1, STOP1 and so on.
This example message will trigger a simple market order for BUY or SELL actions that will remain in-force for the rest of the trading day.
If you place a Buy limit order above the current price, or a Sell limit order below, it will be executed immediately as you're crossing the spread.
This payload will trigger a simple market order for BUY or SELL actions that will use an ATM strategy template and remain in-force for the rest of the trading day.
Similar to the offsetting scenario when sending a Sell after a Buy, when using an ATM strategy, this will create orphaned Stops and Target orders as those are not canceled by default. You must send a CLOSEPOSITION or REVERSEPOSITION command before the next directional trade to avoid this. The quantity you set inside of your CrossTrade alert will supersede your default ATM quantity
If you want to close an existing position before opening a new position, there are 2 options. You can either include "flatten_first=true;" inside your message, or you can use the FLATPLACE command in lieu of PLACE.
Both options are available as convenience and achieve the same net effect of executing a CLOSEPOSITION command prior to the PLACE command.
.
.