Skip to main content

Monitor fields

An Account Manager monitor protects one account with daily targets, limits and trading rules. The same fields apply to NinjaTrader (/nt8/monitors) and Tradovate (/tradovate/monitors) unless the Broker column says otherwise.

Access: W writable, R read-only, C set on create only. Money values are positive amounts in account currency, even for limits. Times are HH:MM, New York time.

FieldTypeAccessBrokerConstraintsDescription
accountstringCBoth1 to 256 characters. Must be one of your accounts. Inner spaces are allowed; leading or trailing spaces, tabs and other whitespace are refusedThe account this monitor protects. NinjaTrader names match exactly, including case; Tradovate names match in any case
environmentdemo, live or nullRTradovateThe Tradovate environment of the account
nicknamestring or nullWBoth1 to 64 characters, not only spaces, no control characters. null removes itDisplay name
activebooleanWBothtrue on a stopped or inactive monitor is refused; use restartWhether the monitor is running
stateactive, paused, stopped or inactiveRBothSee States
stoppedReasonstring or nullRBothWhy the monitor stopped, when state is stopped or inactive
pnlModestandard, hybrid or unrealizedWBoth (hybrid: NinjaTrader)How P&L is measured. See P&L modes
includeUnrealizedbooleanWBothMust be true in unrealized modeCount open-position P&L toward the daily target and limit
dailyProfitTargetnumberWBoth0 or more. 0 turns it offDaily profit target
dailyLossLimitnumberWBoth0 or more. 0 turns it offDaily loss limit, as a positive amount (500 means stop at a $500 loss)
positionProfitTargetnumberWNinjaTrader0 or more. Must be 0 in standard modeProfit target for a single position
positionLossLimitnumberWNinjaTrader0 or more. Must be 0 in standard modeLoss limit for a single position, as a positive amount
includeCommissionsbooleanWNinjaTraderSubtract commissions from P&L
onProfitTargetobjectWBothWhat happens when the daily profit target is reached
onProfitTarget.flattenbooleanWBothMust be true in unrealized modeFlatten the account
onProfitTarget.signalsallow, closing_only or blockWBothWhich signals are accepted afterwards
onLossLimitobjectWBothWhat happens when the daily loss limit is reached
onLossLimit.flattenbooleanWBothMust be true in unrealized modeFlatten the account
onLossLimit.signalsallow, closing_only or blockWBothWhich signals are accepted afterwards
minimumProfitobjectWBothLock in part of a profit: once P&L reaches trigger, stop if it falls back to threshold
minimumProfit.enabledbooleanWBothTurn the rule on
minimumProfit.triggernumberWBoth0 or more; more than 0 when enabledP&L that arms the rule
minimumProfit.thresholdnumberWBoth0 or more, and not above trigger when enabledP&L floor after the rule is armed
minimumProfit.flattenbooleanWBothFlatten when it fires
minimumProfit.signalsallow, closing_only or blockWBothWhich signals are accepted afterwards
trailingDrawdownobjectWBothStop when P&L or net liquidation falls a set amount below its high of the day
trailingDrawdown.enabledbooleanWBothTurn the rule on
trailingDrawdown.basispnl or netliqWBoth (netliq: NinjaTrader)Must be pnl in unrealized modeWhat the drawdown is measured on
trailingDrawdown.amountnumberWBoth0 or more; more than 0 when enabled; at most 100 when unit is percentSize of the drawdown
trailingDrawdown.unitdollars or percentWBothUnit of amount
trailingDrawdown.triggernumberWBoth0 or more. Only used with pnl basisP&L high that must be reached before the trail starts. 0 means it trails from the start
trailingDrawdown.flattenbooleanWBothFlatten when it fires
trailingDrawdown.signalsallow, closing_only or blockWBothWhich signals are accepted afterwards
accountFloornumber or nullWBothGreater than 0. null turns it offStop and flatten when net liquidation falls below this value
autoFlattenTimestring HH:MM or nullWBothA 5-minute mark; null turns it offFlatten the account every weekday at this time
tradingWindowsarray of objectsWBothAt most 5. Enabled windows may not overlap, but one may start when another endsHours when signals are accepted for this account. An empty array turns them off
tradingWindows[].enabledbooleanWBothTurn this window on
tradingWindows[].startstring HH:MM or nullWBothA 5-minute mark. Required when enabledWindow start
tradingWindows[].endstring HH:MM or nullWBothA 5-minute mark. Required when enabled, and then different from start. Earlier than start means the window runs past midnightWindow end
tradingWindows[].flattenAtEndbooleanWBothFlatten the account when the window ends
newsLockoutobjectWBothNews rules for this account
newsLockout.blockSignalsbooleanWBothBlock opening signals around economic events
newsLockout.flattenbooleanWBothFlatten before economic events
blockSignalsbooleanWBothBlock every signal to this account
closingOnlybooleanWBothAccept closing signals only
switchesLockedbooleanWBothPadlock blockSignals and closingOnly: they keep their values through a restart and the daily reset, and a change to either is refused with 409 switches_locked until you send switchesLocked: false (in the same request is fine)
cleanSessionProtectionbooleanWNinjaTraderPause the monitor when positions are open at the session start
outlierProtectionobjectWNinjaTraderIgnore P&L spikes that look like bad data
outlierProtection.enabledbooleanWNinjaTraderTurn outlier protection on
outlierProtection.sensitivitylow, medium or highWNinjaTraderHow aggressively outliers are filtered
createdstring (timestamp) or nullRBothWhen the monitor was created
updatedstring (timestamp) or nullRBothWhen the monitor last changed

Sending a NinjaTrader-only field to a Tradovate monitor returns 422 field_not_applicable.

States​

StateMeaningHow to leave it
activeRunningSet active: false
pausedTurned offSet active: true
stoppedA risk rule fired today. stoppedReason says whichRestart, or wait for the daily reset
inactiveNinjaTrader only: Clean Session Protection paused it because positions were open at the session startRestart

state is worked out, not stored: on NinjaTrader stopped and inactive come from today's trading session, and on Tradovate stopped comes from the monitor's saved status, which the daily reset clears. Otherwise state follows active.

state and stoppedReason are runtime status. They do not change the monitor's ETag.

P&L modes​

ModeInclude unrealizedMeaning
standardfalseRealized P&L only. The monitor stops for the day when a target or limit is reached
standardtrueRealized plus open-position P&L. The monitor stops for the day when a target or limit is reached
hybrid (NinjaTrader)false or trueDaily targets and limits as in standard, plus position-level targets and limits that flatten only that position and keep the monitor running
unrealizedtrueNinjaTrader: open-position P&L is watched continuously and the monitor never stops; each target or limit flattens as soon as it is reached. Tradovate: open-position P&L is only the basis the daily targets and limits read, and the monitor still stops for the day when one is reached

A monitor saved with an older combination reads as the nearest mode with a legacy_value_normalized warning. The next change to the mode saves it in the current form.

Defaults on create​

Everything except account is optional. Left out, a field takes the web app's new-monitor default: active: false, pnlMode: standard, includeUnrealized: true, targets and limits 0, onProfitTarget and onLossLimit set to flatten and block signals, no minimum profit, no trailing drawdown, no account floor, no auto-flatten, no trading windows, no news rules, and blockSignals, closingOnly and switchesLocked off. On NinjaTrader also includeCommissions: true, cleanSessionProtection: true and outlier protection on at low. An empty trailing drawdown reads with unit: percent on NinjaTrader and dollars on Tradovate, as in each editor.

Rules​

  • Ownership. On NinjaTrader the account must be listed by your connected add-on, exactly including case (409 addon_disconnected when the add-on is offline, 404 account_not_found when it does not list the account). Backtest and Playback101 are never accepted. On Tradovate the account is matched, in any case, against your linked Tradovate login (404 account_not_found when it is not there, 409 account_identity_unresolved when the name cannot be matched to a single account).
  • One monitor per account. Creating a monitor for an account that already has one returns 409 already_exists. On Tradovate this includes a monitor saved for the same account under a different spelling. Re-creating a deleted monitor is fine.
  • Read-only fields. A create that includes one is refused (422 field_read_only). A PATCH may include them, so you can send back a whole object from a GET: each is ignored when it equals the saved value and refused when it differs (field_read_only, immutable_field for account, field_not_applicable for a NinjaTrader-only field on Tradovate). updated is always ignored.
  • Trading windows. An enabled window whose start equals its end is refused (empty_window at tradingWindows.N.end), and enabled windows may not overlap (windows_overlap at tradingWindows.N). A window that ends earlier than it starts runs past midnight.
  • Unrealized mode. Both flatten settings must be true, and a trailing drawdown must use pnl basis.
  • Rule codes. A broken rule returns 422 validation_failed, with the field and one of these codes in fields: required_when_enabled (a trailing drawdown on with amount: 0, or a minimum profit on with trigger: 0), percent_above_100, threshold_above_trigger, unrealized_requires_flatten, unrealized_requires_pnl_basis, must_be_true_in_unrealized_mode, not_applicable_in_standard_mode, tradovate_requires_pnl_basis, empty_window or windows_overlap.
  • Stopped monitors can only be resumed with restart. active: true does not resume one: when active is already true it is accepted as unchanged and the response carries a monitor_stopped_use_restart warning, and when it is false it is refused with 409 monitor_stopped_use_restart. Restart is refused with 409 would_retrip when the current P&L would stop the monitor again right away (NinjaTrader), and it lifts blockSignals and closingOnly unless switchesLocked is on.
  • Monitor Lock. While Monitor Lock is on, a monitor that reached a limit today cannot be changed, restarted or deleted until the 5:00 to 6:00 PM ET window (409 monitor_locked).
  • Tandem copiers. A monitor on an account that is a follower in a Tandem copier cannot be deleted (409 tandem_dependency).
  • Settings managed elsewhere. On some accounts the limits are managed by another feature. Changing them returns 409 field_locked (sending their saved values back is fine); other fields stay editable.
  • Legacy values. A value saved before today's rules reads in its current form with a legacy_value_normalized warning and does not block other changes.
Deleting a monitor also changes copiers

Deleting a monitor removes every trade copier that uses the account as its leader or as its single follower, and removes the account from group copiers (a group left with no followers is removed). This is how the web app behaves on both brokers. The response lists the affected copier ids in a copiers_removed warning.

When changes take effect​

  • NinjaTrader: sent to the add-on right after the save, or when it next connects.
  • Tradovate: within about 10 seconds.
  • Auto-flatten and flatten at the end of a trading window run on weekdays, for monitors that are active. A monitor's news rules also need it active. Signal-blocking trading windows apply even while a monitor is paused.