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.
| Field | Type | Access | Broker | Constraints | Description |
|---|---|---|---|---|---|
account | string | C | Both | 1 to 256 characters. Must be one of your accounts. Inner spaces are allowed; leading or trailing spaces, tabs and other whitespace are refused | The account this monitor protects. NinjaTrader names match exactly, including case; Tradovate names match in any case |
environment | demo, live or null | R | Tradovate | The Tradovate environment of the account | |
nickname | string or null | W | Both | 1 to 64 characters, not only spaces, no control characters. null removes it | Display name |
active | boolean | W | Both | true on a stopped or inactive monitor is refused; use restart | Whether the monitor is running |
state | active, paused, stopped or inactive | R | Both | See States | |
stoppedReason | string or null | R | Both | Why the monitor stopped, when state is stopped or inactive | |
pnlMode | standard, hybrid or unrealized | W | Both (hybrid: NinjaTrader) | How P&L is measured. See P&L modes | |
includeUnrealized | boolean | W | Both | Must be true in unrealized mode | Count open-position P&L toward the daily target and limit |
dailyProfitTarget | number | W | Both | 0 or more. 0 turns it off | Daily profit target |
dailyLossLimit | number | W | Both | 0 or more. 0 turns it off | Daily loss limit, as a positive amount (500 means stop at a $500 loss) |
positionProfitTarget | number | W | NinjaTrader | 0 or more. Must be 0 in standard mode | Profit target for a single position |
positionLossLimit | number | W | NinjaTrader | 0 or more. Must be 0 in standard mode | Loss limit for a single position, as a positive amount |
includeCommissions | boolean | W | NinjaTrader | Subtract commissions from P&L | |
onProfitTarget | object | W | Both | What happens when the daily profit target is reached | |
onProfitTarget.flatten | boolean | W | Both | Must be true in unrealized mode | Flatten the account |
onProfitTarget.signals | allow, closing_only or block | W | Both | Which signals are accepted afterwards | |
onLossLimit | object | W | Both | What happens when the daily loss limit is reached | |
onLossLimit.flatten | boolean | W | Both | Must be true in unrealized mode | Flatten the account |
onLossLimit.signals | allow, closing_only or block | W | Both | Which signals are accepted afterwards | |
minimumProfit | object | W | Both | Lock in part of a profit: once P&L reaches trigger, stop if it falls back to threshold | |
minimumProfit.enabled | boolean | W | Both | Turn the rule on | |
minimumProfit.trigger | number | W | Both | 0 or more; more than 0 when enabled | P&L that arms the rule |
minimumProfit.threshold | number | W | Both | 0 or more, and not above trigger when enabled | P&L floor after the rule is armed |
minimumProfit.flatten | boolean | W | Both | Flatten when it fires | |
minimumProfit.signals | allow, closing_only or block | W | Both | Which signals are accepted afterwards | |
trailingDrawdown | object | W | Both | Stop when P&L or net liquidation falls a set amount below its high of the day | |
trailingDrawdown.enabled | boolean | W | Both | Turn the rule on | |
trailingDrawdown.basis | pnl or netliq | W | Both (netliq: NinjaTrader) | Must be pnl in unrealized mode | What the drawdown is measured on |
trailingDrawdown.amount | number | W | Both | 0 or more; more than 0 when enabled; at most 100 when unit is percent | Size of the drawdown |
trailingDrawdown.unit | dollars or percent | W | Both | Unit of amount | |
trailingDrawdown.trigger | number | W | Both | 0 or more. Only used with pnl basis | P&L high that must be reached before the trail starts. 0 means it trails from the start |
trailingDrawdown.flatten | boolean | W | Both | Flatten when it fires | |
trailingDrawdown.signals | allow, closing_only or block | W | Both | Which signals are accepted afterwards | |
accountFloor | number or null | W | Both | Greater than 0. null turns it off | Stop and flatten when net liquidation falls below this value |
autoFlattenTime | string HH:MM or null | W | Both | A 5-minute mark; null turns it off | Flatten the account every weekday at this time |
tradingWindows | array of objects | W | Both | At most 5. Enabled windows may not overlap, but one may start when another ends | Hours when signals are accepted for this account. An empty array turns them off |
tradingWindows[].enabled | boolean | W | Both | Turn this window on | |
tradingWindows[].start | string HH:MM or null | W | Both | A 5-minute mark. Required when enabled | Window start |
tradingWindows[].end | string HH:MM or null | W | Both | A 5-minute mark. Required when enabled, and then different from start. Earlier than start means the window runs past midnight | Window end |
tradingWindows[].flattenAtEnd | boolean | W | Both | Flatten the account when the window ends | |
newsLockout | object | W | Both | News rules for this account | |
newsLockout.blockSignals | boolean | W | Both | Block opening signals around economic events | |
newsLockout.flatten | boolean | W | Both | Flatten before economic events | |
blockSignals | boolean | W | Both | Block every signal to this account | |
closingOnly | boolean | W | Both | Accept closing signals only | |
switchesLocked | boolean | W | Both | Padlock 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) | |
cleanSessionProtection | boolean | W | NinjaTrader | Pause the monitor when positions are open at the session start | |
outlierProtection | object | W | NinjaTrader | Ignore P&L spikes that look like bad data | |
outlierProtection.enabled | boolean | W | NinjaTrader | Turn outlier protection on | |
outlierProtection.sensitivity | low, medium or high | W | NinjaTrader | How aggressively outliers are filtered | |
created | string (timestamp) or null | R | Both | When the monitor was created | |
updated | string (timestamp) or null | R | Both | When the monitor last changed |
Sending a NinjaTrader-only field to a Tradovate monitor returns 422 field_not_applicable.
States
| State | Meaning | How to leave it |
|---|---|---|
| active | Running | Set active: false |
| paused | Turned off | Set active: true |
| stopped | A risk rule fired today. stoppedReason says which | Restart, or wait for the daily reset |
| inactive | NinjaTrader only: Clean Session Protection paused it because positions were open at the session start | Restart |
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
| Mode | Include unrealized | Meaning |
|---|---|---|
| standard | false | Realized P&L only. The monitor stops for the day when a target or limit is reached |
| standard | true | Realized plus open-position P&L. The monitor stops for the day when a target or limit is reached |
| hybrid (NinjaTrader) | false or true | Daily targets and limits as in standard, plus position-level targets and limits that flatten only that position and keep the monitor running |
| unrealized | true | NinjaTrader: 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_disconnectedwhen the add-on is offline,404 account_not_foundwhen it does not list the account).BacktestandPlayback101are never accepted. On Tradovate the account is matched, in any case, against your linked Tradovate login (404 account_not_foundwhen it is not there,409 account_identity_unresolvedwhen 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). APATCHmay include them, so you can send back a whole object from aGET: each is ignored when it equals the saved value and refused when it differs (field_read_only,immutable_fieldforaccount,field_not_applicablefor a NinjaTrader-only field on Tradovate).updatedis always ignored. - Trading windows. An enabled window whose
startequals itsendis refused (empty_windowattradingWindows.N.end), and enabled windows may not overlap (windows_overlapattradingWindows.N). A window that ends earlier than it starts runs past midnight. - Unrealized mode. Both
flattensettings must be true, and a trailing drawdown must usepnlbasis. - Rule codes. A broken rule returns
422 validation_failed, with the field and one of these codes infields:required_when_enabled(a trailing drawdown on withamount: 0, or a minimum profit on withtrigger: 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_windoworwindows_overlap. - Stopped monitors can only be resumed with restart.
active: truedoes not resume one: whenactiveis already true it is accepted as unchanged and the response carries amonitor_stopped_use_restartwarning, and when it is false it is refused with409 monitor_stopped_use_restart. Restart is refused with409 would_retripwhen the current P&L would stop the monitor again right away (NinjaTrader), and it liftsblockSignalsandclosingOnlyunlessswitchesLockedis 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_normalizedwarning and does not block other changes.
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 itactive. Signal-blocking trading windows apply even while a monitor is paused.