Default Tokens

Every expression you write in the YAML references named values called tokens. The engine refreshes the entire token map on every bar before evaluating any of your expressions. When you write `PRICE_NOW > 50000`, the e...

Written By Axiom Admin

Last updated 2 days ago

Default Tokens

Every expression you write in the YAML references named values called tokens. The engine refreshes the entire token map on every bar before evaluating any of your expressions. When you write PRICE_NOW > 50000, the engine looks up PRICE_NOW in the map, gets Pine's current close value, and compares it to the literal 50000.

This page documents every token the engine makes available by default β€” before you connect a single custom indicator. These are the building blocks your expressions have access to out of the box. Custom tokens (your external indicators) are covered at the end.

When examples use names like EMA_200, RSI_K, or ATR_14, assume those are custom tokens you connected from indicators on your chart. They are not built in.

Token names are case-sensitive. PRICE_CLOSE works. price_close does not. Price_Close does not. Get the casing wrong and the engine will raise an "Unknown identifier/token" error during first-bar validation β€” the strategy will not run. The diagnostics table will show exactly which token name was not found. If the strategy is failing to load, check your token names first.

For the full expression syntax β€” operators, functions, and how to combine tokens into conditions β€” see Expression Reference.

Most tables below show both the longhand token and its shorthand alias. The longhand name is the canonical name used in examples and diagnostics because it is easier to read. The alias is for experienced users who want shorter expressions. Both names point at the same runtime value.


Price tokens

These update every bar from the chart's current symbol and timeframe.

Longhand

Alias

Type

What it returns

Example use

PRICE_NOW

PN

Number

Readability token for the same value as PRICE_CLOSE. On historical bars, this is the bar close. On the realtime bar, this is Pine's current developing close value.

PRICE_NOW > EMA_200

PRICE_CLOSE

PC

Number

Current bar's close value. Same value as PRICE_NOW; use this when you want the language to read like a closing-price rule.

PRICE_CLOSE > EMA_200

PRICE_OPEN

PO

Number

Current bar's opening price

PRICE_CLOSE > PRICE_OPEN

PRICE_HIGH

PH

Number

Current bar's high

PRICE_HIGH > HIGHEST(PRICE_HIGH, 20)

PRICE_LOW

PL

Number

Current bar's low

PRICE_LOW < LOWEST(PRICE_LOW, 10)

PRICE_HL2

PHL2

Number

Midpoint of high and low: (high + low) / 2

PRICE_CLOSE > PRICE_HL2

PRICE_HLC3

PHLC3

Number

Typical price: (high + low + close) / 3

Price filter using the bar's typical price

PRICE_HLCC4

PHLCC4

Number

Weighted close: (high + low + close + close) / 4

Smoothed price reference that weights the close

PRICE_OHLC4

POHLC4

Number

Average of all four: (open + high + low + close) / 4

A balanced single-bar price summary

VOLUME

VOL

Number

Current bar's volume

VOLUME > 1000000

When to use which price

PRICE_NOW and PRICE_CLOSE are the same underlying value. The difference is intent. Use PRICE_NOW when the rule reads like "the price available right now." Use PRICE_CLOSE when the rule reads like "the bar's close." On historical bars, both equal the historical bar close. On the realtime bar, both reflect Pine's current developing close value.

Use PRICE_HIGH and PRICE_LOW when you care about the extremes β€” breakouts, range boundaries, stop placement. The averaged variants (HL2, HLC3, HLCC4, OHLC4) are useful when you want a single number that smooths out the bar's range. They are not better or worse than PRICE_CLOSE β€” they are different questions about the same bar.

History references

Any numeric token supports a history suffix. PRICE_CLOSE[1] returns the previous bar's close. PRICE_NOW[1] returns that same previous close through the readability token. The syntax is TOKEN_NAME[N] where N is a non-negative integer. No spaces inside the brackets. See Expression Reference for full details.


Bar and time tokens

Longhand

Alias

Type

What it returns

Example use

BAR_INDEX

BI

Number

The current bar's sequential index (starts at 0)

BAR_INDEX > 200 β€” wait for enough history before evaluating

TIME_OPEN

TO

Number

Opening timestamp of the current bar (Unix ms)

Time-based comparisons and session math

TIME_CLOSE

TC

Number

Closing timestamp of the current bar (Unix ms)

Comparing bar boundaries

TIME_NOW

TN

Number

Current real-world time when the script runs (Unix ms)

Caution: evaluates differently on historical vs. live bars β€” see warning below

BAR_YEAR

BYR

Number

Four-digit year of the bar's open

BAR_YEAR >= 2024

BAR_MONTH

BMON

Number

Month (1–12) of the bar's open

BAR_MONTH >= 3 && BAR_MONTH <= 10 β€” trade only March through October

BAR_WEEK_OF_YEAR

BWOY

Number

Week number (1–53) of the bar's open

Seasonal filters

BAR_DAY_OF_MONTH

BDOM

Number

Day of the month (1–31)

Avoid month-end: BAR_DAY_OF_MONTH < 28

BAR_DAY_OF_WEEK

BDOW

Number

Day of week (1 = Sunday, 7 = Saturday)

BAR_DAY_OF_WEEK >= 2 && BAR_DAY_OF_WEEK <= 6 β€” weekdays only

BAR_HOUR

BHR

Number

Hour (0–23) of the bar's open

Session time gating

BAR_MINUTE

BMIN

Number

Minute (0–59) of the bar's open

Intraday timing

BAR_SECOND

BSEC

Number

Second (0–59) of the bar's open

Rarely useful outside tick-level timing

The TIME_NOW warning

TIME_NOW returns the actual current wall-clock time when the script evaluates. On historical bars during a backtest, this is the time of the recalculation β€” not the time the bar originally occurred. This means:

  • A condition using TIME_NOW will produce different results each time TradingView recalculates the strategy.

  • Results that depend on TIME_NOW are not stable across sessions. If you close your browser and reopen the chart, the results may change.

  • If your strategy's results changed overnight without any YAML changes, TIME_NOW (or a bar-state token) is the most likely cause.

Use TIME_OPEN or the calendar tokens (BAR_HOUR, BAR_DAY_OF_WEEK, etc.) for time-based logic that needs to be stable across recalculations. Reserve TIME_NOW for real-time-only logic where you genuinely need the current wall-clock time.


Symbol information tokens

Longhand

Alias

Type

What it returns

Example use

MIN_TICK

MT

Number

The smallest price increment for the current symbol

Price rounding and stop placement

SYMBOL_POINT_VALUE

SPV

Number

Currency value of one point of price movement

Contract value calculations

SYMBOL_PRICE_SCALE

SPS

Number

Price scale (number of decimal digits in price display)

Precision awareness

These are constants for a given symbol β€” they do not change bar to bar. They are most useful inside price expressions for exits: calculating a stop loss as POSITION_AVERAGE_PRICE - (50 * MIN_TICK) means "50 ticks below my average entry price," which adapts automatically to whatever symbol you are charting.


Timeframe tokens

Longhand

Alias

Type

What it returns

Example use

TIMEFRAME_MULTIPLIER

TFM

Number

The numeric multiplier of the chart's timeframe (e.g., 15 for a 15-minute chart)

TIMEFRAME_MULTIPLIER >= 60 β€” only on hourly or higher

TIMEFRAME_IS_INTRADAY

TFID

True/False

True if the chart timeframe is intraday

Gate conditions that should only run intraday

TIMEFRAME_IS_SECONDS

TFSEC

True/False

True if the chart is on a seconds-based timeframe

TIMEFRAME_IS_TICKS

TFTICK

True/False

True if the chart is on a tick-based timeframe

TIMEFRAME_IS_DAILY

TFDAY

True/False

True if the chart is on a daily timeframe

TIMEFRAME_IS_WEEKLY

TFWK

True/False

True if the chart is on a weekly timeframe

TIMEFRAME_IS_MONTHLY

TFMON

True/False

True if the chart is on a monthly timeframe

Timeframe tokens are useful as gate conditions when you build a strategy that should only evaluate on certain chart resolutions. A strategy tuned for daily charts can use TIMEFRAME_IS_DAILY as a setup gate to prevent accidental evaluation on an intraday chart where the assumptions would be wrong.


Bar state tokens

Longhand

Alias

Type

What it returns

Example use

BAR_STATE_IS_CONFIRMED

BSCONF

True/False

True when the current bar is confirmed (closed)

Ensure conditions only trigger on confirmed data

BAR_STATE_IS_NEW

BSNEW

True/False

True on the first tick of a new bar

BAR_STATE_IS_LAST

BSLAST

True/False

True on the last historical bar or the current real-time bar

BAR_STATE_IS_REAL_TIME

BSRT

True/False

True only on the live, real-time bar β€” false on all historical bars

The historical recalculation trap

BAR_STATE_IS_REAL_TIME is always false during a backtest and always false on historical bars during a recalculation. If you use it in a gate or trigger condition, that condition will never fire in the backtest. Your results will show zero trades, and everything will look like the condition is simply too strict β€” when in reality it is a bar-state token that cannot be true in the test environment.

BAR_STATE_IS_CONFIRMED is the most practically useful bar-state token. If you want a condition to only trigger on the bar's close (not on intra-bar ticks during real-time evaluation), gating on BAR_STATE_IS_CONFIRMED achieves that. Note: in backtesting, all bars are confirmed by definition, so this gate has no filtering effect on historical data. It matters only for real-time behavior.


Session tokens

Longhand

Alias

Type

What it returns

Example use

SESSION_IS_MARKET

SESMKT

True/False

True during regular market hours

SESSION_IS_MARKET as a setup gate β€” trade only during market hours

SESSION_IS_PRE_MARKET

SESPRE

True/False

True during pre-market session

SESSION_IS_POST_MARKET

SESPOST

True/False

True during post-market session

Session tokens are most relevant for equities and futures where pre-market and post-market behavior differs from the regular session. For 24/7 crypto markets, SESSION_IS_MARKET is typically always true. Check your exchange's session definition on TradingView if session gating does not behave as expected.


Strategy statistics tokens

These report the strategy tester's cumulative performance metrics. They update as trades are processed.

Longhand

Alias

Type

What it returns

STRATEGY_EQUITY

STEQ

Number

Current equity (initial capital + net profit + open profit)

STRATEGY_INITIAL_CAPITAL

STICAP

Number

The starting capital configured in Properties

STRATEGY_NET_PROFIT

STNP

Number

Realized net profit in currency

STRATEGY_NET_PROFIT_PERCENT

STNPPCT

Number

Realized net profit as a percentage of initial capital

STRATEGY_GROSS_PROFIT

STGP

Number

Sum of all winning trades in currency

STRATEGY_GROSS_PROFIT_PERCENT

STGPPCT

Number

Gross profit as a percentage

STRATEGY_GROSS_LOSS

STGL

Number

Sum of all losing trades in currency (negative number)

STRATEGY_GROSS_LOSS_PERCENT

STGLPCT

Number

Gross loss as a percentage

STRATEGY_OPEN_PROFIT

STOPNL

Number

Unrealized P/L on all open trades in currency

STRATEGY_OPEN_PROFIT_PERCENT

STOPNLPCT

Number

Unrealized P/L as a percentage

STRATEGY_MAX_DRAWDOWN

STMDD

Number

Maximum peak-to-trough equity decline in currency

STRATEGY_MAX_DRAWDOWN_PERCENT

STMDDPCT

Number

Maximum drawdown as a percentage

STRATEGY_MAX_RUNUP

STMRU

Number

Maximum equity runup in currency

STRATEGY_MAX_RUNUP_PERCENT

STMRUPCT

Number

Maximum runup as a percentage

STRATEGY_OPEN_TRADES

STOTR

Number

Count of currently open trades

STRATEGY_CLOSED_TRADES

STCTR

Number

Count of closed trades

STRATEGY_WINNING_TRADES

STWTR

Number

Count of winning closed trades

STRATEGY_LOSING_TRADES

STLTR

Number

Count of losing closed trades

STRATEGY_EVEN_TRADES

STETR

Number

Count of breakeven closed trades

STRATEGY_AVERAGE_TRADE

STAVGTR

Number

Average trade P/L in currency

STRATEGY_AVERAGE_TRADE_PERCENT

STAVGTRPCT

Number

Average trade P/L as a percentage

STRATEGY_AVERAGE_WINNING_TRADE

STAVGWTR

Number

Average winning trade P/L in currency

STRATEGY_AVERAGE_WINNING_TRADE_PERCENT

STAVGWTRPCT

Number

Average winning trade as a percentage

STRATEGY_AVERAGE_LOSING_TRADE

STAVGLTR

Number

Average losing trade P/L in currency

STRATEGY_AVERAGE_LOSING_TRADE_PERCENT

STAVGLTRPCT

Number

Average losing trade as a percentage

STRATEGY_POSITION_SIZE

STPSZ

Number

Current net position size (positive for long, negative for short, zero for flat)

STRATEGY_POSITION_AVERAGE_PRICE

STPAVG

Number

Average fill price of the current position

STRATEGY_LAST_DIRECTION

STLDIR

Number

Previous bar's position size β€” positive was long, negative was short, zero was flat

STRATEGY_MARGIN_LIQUIDATION_PRICE

STLIQ

Number

Estimated margin liquidation price (where applicable)

STRATEGY_MAX_CONTRACTS_HELD_ALL

STMCHALL

Number

Peak concurrent contracts/units held (both directions)

STRATEGY_MAX_CONTRACTS_HELD_LONG

STMCHL

Number

Peak concurrent contracts/units held on the long side

STRATEGY_MAX_CONTRACTS_HELD_SHORT

STMCHS

Number

Peak concurrent contracts/units held on the short side

STRATEGY_OPEN_TRADES_CAPITAL_HELD

STOTRCAP

Number

Capital currently tied up in open trades

How strategy tokens enable adaptive logic

Strategy statistics tokens let your rules respond to what the strategy is doing, not just what the market is doing. Examples:

  • Equity-based position scaling: Use STRATEGY_EQUITY in an allocation expression to scale position size dynamically β€” smaller after drawdowns, larger after growth.

  • Drawdown gating: Use STRATEGY_MAX_DRAWDOWN_PERCENT > 15 as a setup gate condition to pause new entries after a significant drawdown, even before the risk circuit breaker threshold is reached.

  • Win/loss filtering: After a losing streak, you might gate entries on STRATEGY_LOSING_TRADES - STRATEGY_WINNING_TRADES < 5 to slow down when the strategy is underperforming.

  • Position awareness: STRATEGY_OPEN_TRADES > 0 tells you whether the strategy has open exposure. Useful in gate conditions for entries that should only fire when flat.

These are useful, but they come with a warning: building conditions that reference strategy statistics creates feedback loops. A condition that pauses trading after drawdown will produce a different equity curve than the same strategy without the pause β€” and that different equity curve changes when the pause triggers, which changes the drawdown, which changes when the pause triggers. Test carefully and watch for recursive effects.


Position state tokens

These describe the current aggregated position across all setups and entries.

Longhand

Alias

Type

What it returns

POSITION_READY

POSRDY

True/False

True when position state has been initialized

POSITION_ACTIVE

POSACT

True/False

True when there are open trades

POSITION_DIRECTION

POSDIR

Number

Net direction: 1 for long, -1 for short, 0 for flat

POSITION_ACTIVE_TRADES

POSATR

Number

Count of currently open trades

POSITION_QUEUED_TRADES

POSQTR

Number

Count of orders submitted but not yet filled

POSITION_FILLED_QUANTITY

POSFQTY

Number

Net filled quantity across all open trades

POSITION_AVERAGE_PRICE

POSAVG

Number

Weighted average fill price of the open position

POSITION_PROFIT_AMOUNT

POSPNL

Number

Current unrealized P/L in currency

POSITION_PROFIT_PERCENT

POSPNLPCT

Number

Current unrealized P/L as a percentage

POSITION_MAX_RUNUP

POSMRU

Number

Mirrors TradingView's strategy-level strategy.max_runup series in currency as currently exposed by this build

POSITION_MAX_DRAWDOWN

POSMDD

Number

Mirrors TradingView's strategy-level strategy.max_drawdown series in currency as currently exposed by this build

POSITION_MAX_RUNUP_PERCENT

POSMRUPCT

Number

Mirrors TradingView's strategy-level strategy.max_runup_percent series

POSITION_MAX_DRAWDOWN_PERCENT

POSMDDPCT

Number

Mirrors TradingView's strategy-level strategy.max_drawdown_percent series

POSITION_COMMISSION_PAID

POSCOMM

Number

Currently exposed as a token, but remains 0 in this build

POSITION_CAPITAL_HELD

POSCAP

Number

Capital tied up in the current position

POSITION_ANCHOR_QUANTITY

POSAQTY

Number

Peak quantity observed during the current position cycle

POSITION_REMAINING_QUANTITY

POSRQTY

Number

Current remaining position quantity

POSITION_REMAINING_PERCENT

POSREMPCT

Number

Current remaining position as a percentage of the cycle anchor

POSITION_EXITED_PERCENT

POSEXITPCT

Number

Percentage of the cycle anchor that has already been exited

What position tokens are good for

Position tokens let your exits and entries respond to how the current trade is performing:

  • Trailing behavior: A take profit gated on POSITION_PROFIT_PERCENT > 5 will not trigger until the position has moved at least 5% in your favor. Combine with a price expression to set the actual exit level.

  • Breakeven stops: An exit triggered when POSITION_PROFIT_AMOUNT > 0 and priced at POSITION_AVERAGE_PRICE creates a move-to-breakeven stop after the trade goes green.

  • Flat detection: POSITION_ACTIVE == FALSE in a gate condition prevents entries from evaluating when you already have exposure. Useful for single-trade strategies.

One important qualifier: POSITION_MAX_RUNUP* and POSITION_MAX_DRAWDOWN* are not per-trade excursion counters in this build. The strategy currently populates them from TradingView's strategy-level strategy.max_* series. If you need live open-position behavior, use POSITION_PROFIT_AMOUNT or POSITION_PROFIT_PERCENT instead.


Dynamic state tokens

When you define named setups, entries, and exits in your YAML, the engine automatically creates boolean state tokens for each one. These tokens let expressions in one part of your strategy check the state of another part.

Setup state tokens

For every named setup (e.g., a setup called TREND_FILTER), the engine registers:

Longhand pattern

Alias pattern

Type

True when

<SETUP_NAME>_INACTIVE

<SETUP_NAME>INACT

True/False

The setup is in INACTIVE state

<SETUP_NAME>_CONFIRMING

<SETUP_NAME>CONF

True/False

The setup is currently in CONFIRMING state

<SETUP_NAME>_ACTIVE

<SETUP_NAME>ACT

True/False

The setup has finished confirmation and its trading context is live

So a setup called TREND_FILTER produces TREND_FILTER_INACTIVE, TREND_FILTER_CONFIRMING, and TREND_FILTER_ACTIVE. It also produces shorthand aliases: TREND_FILTERINACT, TREND_FILTERCONF, and TREND_FILTERACT.

Setup lifecycle is:

Example
INACTIVE -> CONFIRMING -> ACTIVE

If no confirmation count is configured, the setup can move from INACTIVE directly to ACTIVE when its activation expression passes. If confirmation is configured, CONFIRMING means the activation condition is holding, but the required bars or ticks have not completed yet.

Example use: An entry gate condition of TREND_FILTER_ACTIVE && VOLATILITY_SETUP_ACTIVE requires two independent setups to both be active before the entry can fire. This is how you build composite regime filters without cramming everything into a single setup's activation expression.

Entry and exit state tokens

For every named entry, take profit, or stop loss (e.g., an entry called BREAKOUT_LONG), the engine registers:

Longhand pattern

Alias pattern

Type

True when

<NAME>_INACTIVE

<NAME>INACT

True/False

The intent is idle β€” not armed, not active

<NAME>_CONFIRMING

<NAME>CONF

True/False

The unit's gate and trigger are true, but its confirmation count has not completed yet

<NAME>_WORKING

<NAME>WORK

True/False

The unit has submitted a resting order, usually a limit, stop, or stop-limit order, but that order has not filled yet

<NAME>_ACTIVE

<NAME>ACT

True/False

The unit has completed its job for the current lifecycle: an entry filled, or an exit executed

Trade-unit lifecycle is:

Example
INACTIVE -> CONFIRMING -> WORKING -> ACTIVE

Not every unit visits every state. Market orders usually skip WORKING. Units with no confirmation count skip CONFIRMING. A limit entry can go from INACTIVE to WORKING, then ACTIVE after it fills.

Example use: A second entry gated on BREAKOUT_LONG_ACTIVE will only evaluate after the first entry has fired in the current lifecycle. This is how you build add-on entries that pyramid only after the initial entry has actually done its job.

Naming requirements

The state token name is derived from the name you give the setup, entry, or exit in your YAML. The engine converts it to an uppercase, underscore-separated form for use in expressions. Keep your names simple and token-friendly β€” alphanumeric characters and underscores. Avoid spaces and special characters in names.


Custom tokens

Custom tokens are the bridge between external indicators on your chart and the expression language. The strategy provides 30 slots, each with three fields: name, type, and source. See Settings for the configuration details.

Once a custom token is registered, it is indistinguishable from a built-in token inside an expression. MY_EMA > PRICE_CLOSE works exactly the same way as STRATEGY_EQUITY > 100000 β€” the engine looks up the name, gets the value, applies the operator.

What custom tokens make possible

Any indicator output on your TradingView chart can become a token. Moving averages, RSI, Bollinger Bands, volume profiles, custom scripts β€” if it produces a plot on the chart, you can wire it into the expression language.

This is the mechanism that makes the strategy builder extensible without needing to build indicators into the engine. The engine does not calculate EMAs or RSIs. It does not need to. You add the indicator you trust to your chart, connect its output as a custom token, and reference it in your expressions. The indicator does the calculation. The strategy builder does the logic.

What happens if a token name is wrong

If you reference a token name in an expression that does not exist β€” because of a typo, because you forgot to register it, or because the name does not match β€” the engine raises an "Unknown identifier/token" error during first-bar validation. The strategy will not run, and the diagnostics table will identify the unrecognized name.

This applies to both built-in tokens and custom tokens. A mistyped custom token name like ema_50 instead of EMA_50 is caught and reported.

After connecting custom tokens, verify that they are reporting sensible values using the token diagnostics label (Show token value label in the Inputs tab). A token that exists but reads 0 on every bar means the source connection is broken β€” the name is correct but the data is not flowing.


Quick reference β€” all default tokens

Numeric tokens (Number type)

Category

Longhand tokens

Alias tokens

Price

PRICE_NOW, PRICE_OPEN, PRICE_CLOSE, PRICE_HIGH, PRICE_LOW, PRICE_HL2, PRICE_HLC3, PRICE_HLCC4, PRICE_OHLC4, VOLUME

PN, PO, PC, PH, PL, PHL2, PHLC3, PHLCC4, POHLC4, VOL

Bar/Time

BAR_INDEX, TIME_OPEN, TIME_CLOSE, TIME_NOW

BI, TO, TC, TN

Calendar

BAR_YEAR, BAR_MONTH, BAR_WEEK_OF_YEAR, BAR_DAY_OF_MONTH, BAR_DAY_OF_WEEK, BAR_HOUR, BAR_MINUTE, BAR_SECOND

BYR, BMON, BWOY, BDOM, BDOW, BHR, BMIN, BSEC

Symbol

MIN_TICK, SYMBOL_POINT_VALUE, SYMBOL_PRICE_SCALE

MT, SPV, SPS

Timeframe

TIMEFRAME_MULTIPLIER

TFM

Strategy

STRATEGY_EQUITY, STRATEGY_INITIAL_CAPITAL, STRATEGY_NET_PROFIT, STRATEGY_NET_PROFIT_PERCENT, STRATEGY_GROSS_PROFIT, STRATEGY_GROSS_PROFIT_PERCENT, STRATEGY_GROSS_LOSS, STRATEGY_GROSS_LOSS_PERCENT, STRATEGY_OPEN_PROFIT, STRATEGY_OPEN_PROFIT_PERCENT, STRATEGY_MAX_DRAWDOWN, STRATEGY_MAX_DRAWDOWN_PERCENT, STRATEGY_MAX_RUNUP, STRATEGY_MAX_RUNUP_PERCENT, STRATEGY_OPEN_TRADES, STRATEGY_CLOSED_TRADES, STRATEGY_WINNING_TRADES, STRATEGY_LOSING_TRADES, STRATEGY_EVEN_TRADES, STRATEGY_AVERAGE_TRADE, STRATEGY_AVERAGE_TRADE_PERCENT, STRATEGY_AVERAGE_WINNING_TRADE, STRATEGY_AVERAGE_WINNING_TRADE_PERCENT, STRATEGY_AVERAGE_LOSING_TRADE, STRATEGY_AVERAGE_LOSING_TRADE_PERCENT, STRATEGY_POSITION_SIZE, STRATEGY_POSITION_AVERAGE_PRICE, STRATEGY_LAST_DIRECTION, STRATEGY_MARGIN_LIQUIDATION_PRICE, STRATEGY_MAX_CONTRACTS_HELD_ALL, STRATEGY_MAX_CONTRACTS_HELD_LONG, STRATEGY_MAX_CONTRACTS_HELD_SHORT, STRATEGY_OPEN_TRADES_CAPITAL_HELD

STEQ, STICAP, STNP, STNPPCT, STGP, STGPPCT, STGL, STGLPCT, STOPNL, STOPNLPCT, STMDD, STMDDPCT, STMRU, STMRUPCT, STOTR, STCTR, STWTR, STLTR, STETR, STAVGTR, STAVGTRPCT, STAVGWTR, STAVGWTRPCT, STAVGLTR, STAVGLTRPCT, STPSZ, STPAVG, STLDIR, STLIQ, STMCHALL, STMCHL, STMCHS, STOTRCAP

Position

POSITION_DIRECTION, POSITION_ACTIVE_TRADES, POSITION_QUEUED_TRADES, POSITION_FILLED_QUANTITY, POSITION_AVERAGE_PRICE, POSITION_PROFIT_AMOUNT, POSITION_PROFIT_PERCENT, POSITION_MAX_RUNUP, POSITION_MAX_DRAWDOWN, POSITION_MAX_RUNUP_PERCENT, POSITION_MAX_DRAWDOWN_PERCENT, POSITION_COMMISSION_PAID, POSITION_CAPITAL_HELD, POSITION_ANCHOR_QUANTITY, POSITION_REMAINING_QUANTITY, POSITION_REMAINING_PERCENT, POSITION_EXITED_PERCENT

POSDIR, POSATR, POSQTR, POSFQTY, POSAVG, POSPNL, POSPNLPCT, POSMRU, POSMDD, POSMRUPCT, POSMDDPCT, POSCOMM, POSCAP, POSAQTY, POSRQTY, POSREMPCT, POSEXITPCT

Boolean tokens (True/False type)

Category

Longhand tokens

Alias tokens

Bar State

BAR_STATE_IS_CONFIRMED, BAR_STATE_IS_NEW, BAR_STATE_IS_LAST, BAR_STATE_IS_REAL_TIME

BSCONF, BSNEW, BSLAST, BSRT

Session

SESSION_IS_MARKET, SESSION_IS_PRE_MARKET, SESSION_IS_POST_MARKET

SESMKT, SESPRE, SESPOST

Timeframe

TIMEFRAME_IS_INTRADAY, TIMEFRAME_IS_SECONDS, TIMEFRAME_IS_TICKS, TIMEFRAME_IS_DAILY, TIMEFRAME_IS_WEEKLY, TIMEFRAME_IS_MONTHLY

TFID, TFSEC, TFTICK, TFDAY, TFWK, TFMON

Position

POSITION_READY, POSITION_ACTIVE

POSRDY, POSACT

Dynamic setup

<SETUP_NAME>_INACTIVE, <SETUP_NAME>_CONFIRMING, <SETUP_NAME>_ACTIVE

<SETUP_NAME>INACT, <SETUP_NAME>CONF, <SETUP_NAME>ACT

Dynamic entry/exit

<ENTRY_OR_EXIT_NAME>_INACTIVE, <ENTRY_OR_EXIT_NAME>_CONFIRMING, <ENTRY_OR_EXIT_NAME>_WORKING, <ENTRY_OR_EXIT_NAME>_ACTIVE

<ENTRY_OR_EXIT_NAME>INACT, <ENTRY_OR_EXIT_NAME>CONF, <ENTRY_OR_EXIT_NAME>WORK, <ENTRY_OR_EXIT_NAME>ACT