Configuration > Options >

Strategies Tab

Print this Topic Previous pageReturn to chapter overviewNext page

The Strategies tab sets options regarding handling of ATM Strategies and NinjaScript strategies for automated system trading.

 

tog_minusUnderstanding the ATM tab

Options_Strategies_Tab_1

 

ATM Strategy

This section sets ATM strategy handling options.

 

Modify inner bracket

When enabled and scaling into a position strategy, the inner bracket (stop loss and profit target orders) quantities will be modified to reflect the increased position strategy size else the outer bracket is modified

Modify nearest bracket

When enabled, the nearest bracket (stop loss and profit target orders) quantities are modified when changing the quantity of a stop loss or target order in a multi target strategy. This property is used in conjunction with "Modify inner bracket". For example, if both "Modify inner..." and "Modify nearest..." are enabled and you modify target 2 from 1 contract to 2 contracts, target 1 order size will be reduced by 1. If you had "Modify inner..." disabled, target 3 order size will be reduced by 1.

Use last price for auto trail and auto breakeven

When enabled, the last trade price is used to trigger auto trail or auto breakeven functions. When disabled, the bid is used for long positions, the ask is used for short positions.

tog_minusUnderstanding the NinjaScript tab

Options_Strategies_Tab_2

 

On Starting a Real-Time Strategy

 

Wait until flat before executing live

When starting a NinjaScript strategy that relies on historical data for calculating its current positions and order states, it will wait until the strategy position has reached or crossed a flat position before executing any live orders. All trading done before this condition will be virtual, simulated trades.

Immediately submit live working historical orders

When starting a NinjaScript strategy that relies on historical data for calculating its current position and orders states, it will immediately submit live any working orders that reflect the current strategy's overall order state. It is IMPORTANT to understand that the position of the strategy reported in the Strategies tab may not reflect the actual account-based position reported in the Accounts tab at the time the strategy is started. In this scenario, it is highly recommend that the account position be synced to the strategy position.

 

On Connection Loss

 

Disconnect delay seconds

Sets the number of seconds a disconnect must exceed before it is determined as a disconnect in regards to the Handling options (see below).

Number of restart attempts

Sets the number of times NinjaTrader will attempt to restart a strategy within the "Restarts within x minutes" time span. The strategy will only restart off a reestablished connection when there have been fewer restart attempts than "Number of restart attempts" within the last "Restarts within x minutes" time span. Otherwise the strategy will just be stopped and no further restart attempts will be taken.

Restarts within x minutes

Sets the number of minutes for the "Restarts within x minutes" time span used by "Number of restart attempts".

Handling

Sets the NinjaScript strategy action to take after a disconnect:

 

KeepRunning: Keeps the strategy running and logs the disconnect. When the connection is reestablished the strategy will resume as if no disconnect occurred.

 

Recalculate: Strategies will attempt to recalculate its strategy position when a connection is reestablished and held for longer than 10 seconds. Recalculations will only occur if the strategy was stopped based on the conditions below. Should the connection be reestablished before the strategy was stopped, the strategy will continue running without recalculating as if no disconnect occurred.

If data feed disconnects for longer than the time specified in “Disconnect delay seconds”, the strategy is stopped and the disconnect is logged.
If the order feed disconnects and the strategy places an order action while disconnected, the strategy is stopped and the disconnect is logged.
If both the data and order feeds disconnect for longer than the time specified in “Disconnect delay seconds”, the strategy is stopped and the disconnect is logged.

 

StopStrategy: Automatically stops the strategy and logs the disconnect when disconnected for more than "Disconnect Delay Seconds". No action will be taken when a connection is reestablished.

 

Order Handling

 

Cancel entry orders when a strategy is disabled

Enables or disables automatically cancelling of the NinjaScript strategy entry orders when a strategy is disabled.

Cancel exit orders when a strategy is disabled

Enables or disables automatically cancelling of the NinjaScript strategy exit orders when a strategy is disabled.