Option Position Indicators

Option Position Count indicator

Returns the number of open option contract positions/legs matching the filter criteria. Portfolio-wide (no underlying, option type, direction, or spread filters): open legs plus legs reserved by earli

Definition

Returns the number of open option contract positions/legs matching the filter criteria. Portfolio-wide (no underlying, option type, direction, or spread filters): open legs plus legs reserved by earlier true OpenOption signals in the same tick's strategy loop. Filtered counts (e.g. per ticker) use open legs only. Use Option Spread Count for multi-leg spread groups.

Parameters

Underlying (optional), Option Type (call/put, optional), Direction (long/short, optional), Spread Type (optional)

Output range: 0 to ∞

Example condition

text
`Open option position count (portfolio-wide) < 4` (Global leg cap for single-leg entries; use `< maxOpenLegs - 1` for 2-leg verticals)

Use in a strategy

Add this indicator to a strategy condition, choose its supported parameters and compare the output with the threshold required by your rule. Preserve the same interval and lookback when comparing backtests.

After saving the condition, inspect its asset, interval, lookback and comparison operator against the parameters above. If no trades occur, check whether the condition ever became true and whether the requested input data exists for that period. A missing input is not a zero-valued signal. An indicator produces an input to a rule. It does not establish future returns, and data availability can differ across assets and periods.