Strategy State Data

The Strategy State Data rule provides comprehensive strategy-level performance metrics and state information. It serves as the central hub for strategy performance analytics, continuously collecting and calculating metrics that span all accounts and trades within a strategy, delivering a holistic view of profitability, risk exposure, trade statistics, and overall performance.

How It Works

The Strategy State Data rule aggregates data across all accounts and trades in your strategy, providing a unified picture of performance at the strategy level rather than at the individual account level. All monetary values are expressed in the currency you specify, enabling consistent reporting even when trading across multiple accounts with different base currencies.

The rule tracks several categories of metrics:

  • Profitability: Gross profit (both open and closed positions), open profit, equity calculations, and risk-adjusted returns. Performance is measured against multiple baselines—both the starting balance and the allocated risk amount—so you can evaluate whether the strategy is generating returns that justify the risk being taken.
  • Expectancy: The maximum expectancy (sum of profit if all take-profit levels are reached), expected value (maximum expectancy multiplied by the expected win rate), and the expectancy factor (ratio of expected value to total risk).
  • Risk Metrics: Maximum drawdown calculated in absolute terms and as percentages of starting balance, allocated risk, and current equity. The rule maintains historical extremes for maximum profit and maximum loss to help identify the strategy’s performance boundaries.
  • Trade Statistics: Detailed counts of winning and losing trades by direction (buy and sell), total trades, and current positions. It also tracks open and closed positions, order types (limit, stop, limit-stop, stop-limit), and whether any positions are currently open.
  • Operational Metrics: Strategy duration, reset counts, and the current date and time when metrics were calculated.

The rule updates its calculations in real time as trading events occur, including price ticks, order updates, and strategy completion events, ensuring that all metrics remain current and accurate for risk management and performance monitoring.

Inputs

Parameter Description Required Default
State Currency Code The currency code in which to express all monetary output values, including profit figures, equity calculations, and risk metrics. This allows consistent reporting across multi-currency strategies. Yes

Outputs

Output Description
Starting Balance The total starting balance allocated across all accounts in the strategy, in the specified currency.
Risk Amount The total risk amount allocated across all accounts in the strategy, in the specified currency.
Risk Amount % (Starting Balance) The total risk amount as a percentage of the strategy’s starting balance.
Gross Profit The total profit for both open and closed positions across the entire strategy.
Gross Profit % The total profit as a percentage of the strategy’s starting balance.
Gross Profit % (R) The total profit as a percentage of the total risk amount allocated to the strategy.
Open Profit The total profit for open positions only across the entire strategy.
Open Profit % Open positions profit as a percentage of starting balance.
Open Profit % (R) Open positions profit as a percentage of total risk amount.
Equity The current equity of the strategy (starting balance plus gross profit).
Max Expectancy The sum of profit that would be achieved if all take-profit levels are reached across all positions.
Expectancy Factor The ratio of the maximum expectancy value to the total risk amount.
Expected Value The maximum expectancy multiplied by the expected win rate, representing the anticipated return.
Expected Win Rate The win rate calculated by analysing time elapsed against historical win rate data.
Max Profit The highest cumulative gross profit recorded throughout the strategy’s execution.
Max Profit % (Starting Balance) Maximum profit as a percentage of starting balance.
Max Profit % (R) Maximum profit as a percentage of total risk amount.
Max Loss The lowest cumulative gross profit (largest loss) recorded throughout execution.
Max Loss % (Starting Balance) Maximum loss as a percentage of starting balance.
Max Loss % (R) Maximum loss as a percentage of total risk amount.
Max Drawdown The greatest peak-to-trough decline in strategy equity.
Max Drawdown % (Allocated R) Maximum drawdown as a percentage of the total risk amount.
Max Drawdown % (Allocated R Equity) Maximum drawdown as a percentage of equity at the time, starting from allocated risk.
Max Drawdown % (Starting Balance) Maximum drawdown as a percentage of starting balance.
Max Drawdown % (Starting Balance Equity) Maximum drawdown as a percentage of equity at the time, starting from starting balance.
Trades The total number of trades executed across all accounts.
Buy Trades The total number of buy trades executed.
Sell Trades The total number of sell trades executed.
Wins The total number of winning trades.
Buy Wins The total number of winning buy trades.
Sell Wins The total number of winning sell trades.
Losses The total number of losing trades.
Buy Losses The total number of losing buy trades.
Sell Losses The total number of losing sell trades.
Open Positions The current total number of open positions across all accounts.
Max Open Positions The maximum number of simultaneous open positions ever reached.
Buy Positions The current number of open buy positions.
Max Open Buy Positions The maximum number of simultaneous open buy positions reached.
Sell Positions The current number of open sell positions.
Max Open Sell Positions The maximum number of simultaneous open sell positions reached.
Closed Positions The total number of closed positions across all accounts.
Closed Buy Positions The total number of closed buy positions.
Closed Sell Positions The total number of closed sell positions.
Open Orders The current total number of open orders across all accounts.
Buy Limit Orders The current number of open buy limit orders.
Buy Stop Orders The current number of open buy stop orders.
Sell Limit Orders The current number of open sell limit orders.
Sell Stop Orders The current number of open sell stop orders.
Buy Limit Stop Orders The current number of open buy limit stop orders.
Sell Limit Stop Orders The current number of open sell limit stop orders.
Buy Stop Limit Orders The current number of open buy stop limit orders.
Sell Stop Limit Orders The current number of open sell stop limit orders.
Duration The total duration of the strategy in seconds.
Resets The number of times the strategy has been reset.
Has Open Positions A true/false value indicating whether any positions are currently open.
Current Date Time The current date and time when the metrics were calculated.

Tips

Use the “Gross Profit % (R)” output to evaluate your strategy’s return relative to the risk you allocated—this is one of the most meaningful performance measures because it normalises returns against your risk budget. The multiple drawdown percentage calculations (based on starting balance, allocated risk, and equity) give you different perspectives on risk exposure; use the one most relevant to your risk framework. Connect the “Has Open Positions” output to conditional logic to control strategy behaviour based on whether positions are currently active.

Was this helpful? Let us know