ChartnautDocs

RuleSet

The canonical form, returned on read with every default filled in and every id present.

object
day_resetobject
Show fields
timestring
Default 17:00Pattern ^[0-2][0-9]:[0-5][0-9]$
tzstring

An IANA time zone.

Default America/New_York
rulesarray of object · Rule
At most 50 items
Show item fields
idstring

Your name for the rule; defaults to its type (then type_2, …). Breaches name it.

Pattern ^[A-Za-z0-9_.:-]{1,64}$
typestringRequired
One of daily_loss max_drawdown max_position_size max_open_positions profit_target slippage

One of

daily_loss
type"daily_loss"Required
limitone of 3 types · MoneyLimitRequired

An amount (a bare number, or {"amount": n}), or {"percent": n} of the starting balance.

Show options

One of

number
More than 0
With amount
amountnumberRequired
More than 0
With percent
percentnumberRequired
More than 0, at most 100
basisstring

Measured from the start-of-day balance or equity.

One of balance equityDefault balance
on_breachstring
One of record block_order close_and_endDefault record
max_drawdown
type"max_drawdown"Required
limitone of 3 types · MoneyLimitRequired

An amount (a bare number, or {"amount": n}), or {"percent": n} of the starting balance.

Show options

One of

number
More than 0
With amount
amountnumberRequired
More than 0
With percent
percentnumberRequired
More than 0, at most 100
modestring

fixed from the starting balance; trailing from the peak.

One of fixed trailingDefault fixed
peakstring

Trailing only: what the peak follows (equity is updated on every price change).

One of equity balanceDefault equity
stop_at_starting_balanceboolean

Trailing only: the floor stops rising once it reaches the starting balance.

Default false
on_breachstring
One of record block_order close_and_endDefault record
max_position_size
type"max_position_size"Required
limitone of 2 typesRequired

The largest position per market, in units as the platform shows them (lots, contracts, coins, shares), up to three decimals: a number or {"units": n}.

Show options

One of

number
More than 0
With units
unitsnumberRequired
More than 0
on_breachstring
One of record block_order close_and_endDefault record
max_open_positions
type"max_open_positions"Required
limitone of 2 typesRequired
Show options

One of

integer
At least 1
With count
countintegerRequired
At least 1
on_breachstring
One of record block_order close_and_endDefault record
profit_target
type"profit_target"Required
targetone of 3 types · MoneyLimitRequired

An amount (a bare number, or {"amount": n}), or {"percent": n} of the starting balance.

Show options

One of

number
More than 0
With amount
amountnumberRequired
More than 0
With percent
percentnumberRequired
More than 0, at most 100
basisstring

Reached when equity hits it, or when an exit brings the closed balance to it. The recorded result is the closed balance.

One of equity balanceDefault equity
slippage
type"slippage"Required
ticksintegerRequired

Every market and stop fill moves this many ticks against the trader. Limits never slip. A cost, never a breach.

0 to 10,000

Used by#