Condition Field Reference
This is the full catalog of fields you can build conditions and formulas on. You pick them from a searchable list, grouped by category, rather than typing them; in a formula box the same fields complete as you type.
The picker only offers the fields that apply where you are:
| Where you're writing | Fields you get |
|---|---|
| A template's rules, or a position's own rules | Position, Leg, Underlying, Time |
| A strategy's rules, its calculated variables, and its multipliers | Time, Underlying (by symbol), Account, Portfolio, Strategy, plus your variables |
| A calculated global variable | Time, Underlying (by symbol), Account, Portfolio, plus other global variables |
| A Close positions filter, or an aggregate's Positions where and Field | Position filter fields |
Types decide which comparisons you get. Number fields offer the full set (greater than, less than, equal, not equal…). Time fields offer after, before, and at. Yes/No fields offer is / is not. Text and C or P fields offer only equal / not equal.
Important
P&L %, P&L $ (per lot), and P&L $ (whole position) are the fields to think twice about on a closing rule. A profit or loss level belongs in the rule's P&L target — percent of initial premium, or dollars per lot — where it can rest at your broker; written as a condition instead, the same level runs in the app and stops protecting you the moment VolNinja does. The editor warns you when it sees a price condition on a rule with no target.
Important
Every P&L field is gross: commissions are not taken off. That covers P&L % and P&L $ in every form, Best and Worst P&L, and the P&L fields under Portfolio, Strategy, and Position filter. A rule's P&L target is gross too. The Net P&L shown on the Dashboard and in Position Details is after commissions, so a take-profit fires before Net P&L reaches your level, and a stop fires after Net P&L has passed it. To aim at a net figure, move the level by your expected round-trip commission: up for a take-profit, closer to zero for a stop.
Position fields
In a template's rules and a position's own rules.
| Field | Type | What it means |
|---|---|---|
| P&L % | Number | Profit or loss as a percentage of the original structure's premium, the amount paid or received at entry, not counting rolls. The profit or loss itself includes what any rolls realized. This is the basis a percentage P&L target uses. |
| P&L % of Total Premium | Number | The same profit or loss as a percentage of Total Premium: the original premium plus the net credit or debit any rolls added. A P&L target can't use it, so a rule on it always runs in the app. |
| P&L $ (per lot) | Number | Profit or loss in dollars per lot — one copy of the template's legs at their ratios, including rolls. This is what a dollar P&L target compares against. Falls back to the whole-position figure for a position opened without a stored lot count. |
| P&L $ (whole position) | Number | Profit or loss in dollars across the whole position, including profit or loss already taken by rolls. |
| Delta (per lot) | Number | Net position delta for one lot, so the same threshold means the same thing at any Multiplier. Unknown if any open leg has no delta quote. |
| Delta (whole position) | Number | Net position delta across all lots, its share-equivalent directional exposure. Unknown if any open leg has no delta quote. |
| Gamma (per lot) | Number | Net position gamma for one lot. Unknown if any open leg has no gamma quote. |
| Gamma (whole position) | Number | Net position gamma across all lots. Unknown if any open leg has no gamma quote. |
| Theta (/min, per lot) | Number | Net position theta for one lot, as value lost per calendar minute. Unknown if any open leg has no theta quote. |
| Theta (/min, whole position) | Number | Net position theta across all lots, per calendar minute. Unknown if any open leg has no theta quote. |
| Entry Price | Number | Net premium of the original structure when the position opened. |
| Initial Premium | Number | Net premium of the original structure, signed (credit or debit), not counting rolls. |
| Total Premium | Number | Initial premium plus the net credit or debit any rolls added. |
| Current Price | Number | Current mid-market value of the position. |
| Current Price (Bid) | Number | Current bid-side value of the position. |
| Current Price (Ask) | Number | Current ask-side value of the position. |
| Best P&L $ (per lot) | Number | Best P&L $ (whole position) for one lot. Use it for a dollar give-back rule that means the same thing at any size. |
| Worst P&L $ (per lot) | Number | Worst P&L $ (whole position) for one lot. |
| Best P&L $ (whole position) | Number | The highest P&L in dollars the position has reached so far. Starts at 0 when it fills, so it is never below 0. |
| Worst P&L $ (whole position) | Number | The lowest P&L in dollars the position has reached so far; negative once it has been under water. Starts at 0 when it fills. |
| Best P&L % | Number | Best P&L $ (whole position) as a percentage of the initial premium (same basis as P&L %). |
| Worst P&L % | Number | Worst P&L $ (whole position) as a percentage of the initial premium. |
| Hours Open | Number | Hours since the position opened. |
| Minutes Open | Number | Minutes since the position opened. |
| Minutes to Expiration | Number | Minutes until the nearest open leg's series stops trading (16:00 ET for SPX weeklies, early closes included); 0 once past. Unknown for an underlying whose session hours aren't known. |
| Underlying at Entry | Number | The underlying's price when the position filled. Unknown if it could not be recorded at the fill. |
| Underlying Move Since Entry | Number | How far the underlying has moved since the position filled, in points: Last minus Underlying at Entry, positive when it is higher. For example, "close if Underlying Move Since Entry is below −30" exits after a 30-point drop. Unknown if either price is unknown. Outside regular hours, SPX and XSP measure against the same futures-derived price its entry was recorded at. |
| Open Legs | Number | How many of the position's legs are still open. |
| Lots (open) | Number | How many lots are still open: the Multiplier you opened with, less any lots already closed. Useful for scaling out: "close half while Lots is more than 1" stops at the last lot. Unknown for a position opened without a lot count. |
Best P&L and Worst P&L are recorded only while the position's rules are being checked, and they start over whenever the position is split: by Split Position…, or when a close fills only part of the position and the filled part is split off.
Per lot or whole position? A lot is one copy of the template's legs at their ratios, and the Multiplier decides how many a position holds. A per-lot field reads the same on a 1-lot and a 10-lot, so a template's rules mean the same thing at any size. Use the whole-position field when you really mean the total, for example to cap a big position's overall delta.
Leg fields
In a template's rules and a position's own rules. When you choose a leg field, you also pick which leg it refers to.
| Field | Type | What it means |
|---|---|---|
| P&L % | Number | The leg's profit or loss as a percentage of its initial premium, through any rolls. |
| P&L $ (per lot) | Number | The leg's profit or loss in dollars per lot of the position, through any rolls. This is what a dollar P&L target on a Close Leg rule compares against. |
| P&L $ (all lots) | Number | The leg's profit or loss in dollars across all its lots, through any rolls. |
| Initial Premium | Number | The leg's signed premium when it first opened, not counting rolls. |
| Total Premium | Number | The leg's initial premium plus the net credit or debit its rolls added. |
| Delta | Number | The leg's current delta, per contract as quoted — not adjusted for Buy/Sell or size. |
| Gamma | Number | The leg's current gamma, per contract as quoted — not adjusted for Buy/Sell or size. |
| Theta (/min) | Number | The leg's current theta, as value lost per calendar minute, per contract as quoted — not adjusted for Buy/Sell or size. |
| IV | Number | The leg's current implied volatility, per contract as quoted — not adjusted for Buy/Sell or size. |
| Strike | Number | The leg's strike price. |
| Distance to Strike | Number | How many points the underlying is from this leg's strike, positive while the leg is out of the money and negative once it is in the money. For example, "Distance to Strike below 5" on a short put fires when the price comes within 5 points of the strike or goes past it. Unknown if the price is unknown, and once the leg has closed, expired, or been rolled away. |
| In the Money | Yes/No | Whether this leg is in the money right now. Unknown if the price is unknown, and once the leg has closed, expired, or been rolled away. |
| Rolls | Number | How many times this leg has been rolled. "Rolls is 2 or more" lets a rule close instead of rolling a third time. |
| Price | Number | The leg's current mid price. |
| Bid | Number | The leg's current bid price. |
| Ask | Number | The leg's current ask price. |
| Entry Price | Number | The price the leg filled at when it opened. |
| Underlying at Entry | Number | The underlying's price when this leg filled. After a roll, the price when the roll filled. Unknown if it could not be recorded. |
| Underlying Move Since Entry | Number | How far the underlying has moved since this leg filled, in points, positive when it is higher. After a roll it measures from the roll. Unknown if either price is unknown, and once the leg has closed, expired, or been rolled away. Outside regular hours, SPX and XSP measure against the same futures-derived price its entry was recorded at. |
| Best P&L $ (per lot) | Number | The leg's Best P&L $ (all lots) per lot of the position. |
| Worst P&L $ (per lot) | Number | The leg's Worst P&L $ (all lots) per lot of the position. |
| Best P&L $ (all lots) | Number | The highest P&L in dollars the leg has reached, through rolls; frozen once the leg closes. |
| Worst P&L $ (all lots) | Number | The lowest P&L in dollars the leg has reached, through rolls; frozen once the leg closes. |
| Best P&L % | Number | Leg Best P&L $ (all lots) as a percentage of the leg's initial premium. |
| Worst P&L % | Number | Leg Worst P&L $ (all lots) as a percentage of the leg's initial premium. |
| Type (C/P) | C or P | Whether the leg is a call or a put. |
| Is Open | Yes/No | Whether the leg is currently open. |
Underlying fields
| Field | Type | What it means |
|---|---|---|
| Last | Number | Last traded price of the underlying. For SPX and XSP outside regular hours, the futures-derived price (see below). |
| Close | Number | The underlying's previous-session closing price. |
| Open | Number | The underlying's opening price for the current session. |
| High | Number | The highest price of the current session so far. |
| Low | Number | The lowest price of the current session so far. |
| Minutes to Close | Number | Minutes until the expiring options of the current session stop trading: 4:00 PM ET for SPX, earlier on half days. It floors at 0 in the last sub-minute before the close, then rolls to counting down to the next session's close. Unknown when no session is running, and for an underlying whose trading hours aren't set up yet. Use this instead of a clock time for an exit before the close, so it still works on a half day. |
| Change on Day | Number | Last price minus the previous session's close, in points. Unknown if either price is unknown. Outside regular hours it shows the last session's change, except for SPX and XSP, where it is unknown. |
| Change on Day % | Number | The same change as a percentage of the previous close. Unknown if either price is unknown. |
SPX and XSP outside regular hours. Their options keep trading after 4:00 PM ET and overnight, but the index itself stops at the close, so its own prices would sit frozen. Before 9:30 AM, after 4:00 PM ET, and on weekends, Last reads the futures-derived price instead (the same one Underlying Move Since Entry uses), or is unknown if there is none. Open, High, Low, and Change on Day are unknown, so a rule on them waits for the next session rather than reading a frozen number. Close still shows the previous close. SPY and QQQ are not affected.
In a template's or a position's rules these mean this position's underlying. In a strategy, which has no single underlying, each supported symbol appears by name instead, such as SPX · Last, SPX · High, and SPX · Minutes to Close.
Time fields
Available everywhere a rule is written.
| Field | Type | What it means |
|---|---|---|
| Current Time | Time | The current time in ET, on a 24-hour clock. |
| Minutes Since Open | Number | Minutes since the 9:30 AM ET open. |
| Day of Week | Number | The weekday, where 0 = Monday through 6 = Sunday. |
| Market Open | Yes/No | Whether the market is open (9:30 AM to 4:00 PM ET, Monday to Friday). |
On a half day, write an exit before the close with Minutes to Close rather than a clock time.
Account fields
In a strategy's rules and in calculated variables. These are your broker's own figures, the same four the Dashboard shows; for what VolNinja itself has done across your positions, see Portfolio fields.
| Field | Type | What it means |
|---|---|---|
| Account Value | Number | Total account value (net liquidation). |
| Buying Power | Number | Available buying power. |
| Maint. Margin | Number | Maintenance margin requirement. |
| Excess Liquidity | Number | Equity minus maintenance margin. |
Portfolio fields
In a strategy's rules and in calculated variables. These summarize all your open positions at once.
| Field | Type | What it means |
|---|---|---|
| Open Positions | Number | How many positions are currently open. |
| Total Unrealized P&L | Number | Unrealized profit or loss summed across all open positions. |
| Total Realized P&L | Number | Profit or loss from positions closed today. Unknown if any of them has no recorded P&L. |
| Day P&L | Number | The day's total, unrealized plus realized. Unknown if either part is unknown. |
| Total Delta | Number | Combined delta across all open positions. |
| Total Gamma | Number | Combined gamma across all open positions. Unknown if any open leg has no gamma quote. |
| Total Theta (/min) | Number | Combined theta across all open positions, per calendar minute. Unknown if any open leg has no theta quote. |
| Total Premium | Number | Total premium (initial plus any roll credits or debits) summed across all open positions. |
| Last Entry Underlying Price | Number | The underlying's price at your most recent entry among positions still open. Unknown while no position is open. |
| Last Entry Time | Text | When your most recent still-open position opened, as a date-and-time. |
| SPX Move from Last Entry | Number | How far the underlying has moved, in dollars, since your most recent entry among positions still open. |
Strategy fields
In a strategy's own rules, calculated variables, and multipliers. These describe the strategy's own trades, in the mode it's running in.
| Field | Type | What it means |
|---|---|---|
| My Open Count | Number | This strategy's open positions, plus any entry that's still being filled. |
| My Entries Today | Number | Positions this strategy has opened today, open or already closed. |
| Minutes Since My Last Entry | Number | Minutes since this strategy's most recent entry, however long ago, counted from when its order was sent while it's still filling, or from when it filled once settled. A failed entry doesn't count, so the gap is between entries, not attempts. A strategy that has never entered reads 1,000,000: "at least N minutes" is true, "less than N minutes" is false. |
| My Day P&L | Number | Realized P&L from this strategy's positions closed today, plus unrealized P&L on its open ones. Unknown if any position's P&L is unknown. |
Strategy conditions can also read your own variables (my.*), shared global ones (global.*), and aggregates (agg.*); see Strategy Variables. A calculated global variable has no strategy to read from, so it sees neither Strategy fields nor my.* and agg.*.
Position filter fields
In a strategy's Close positions filter, and in an aggregate's Positions where and Field. Each is evaluated per position.
| Field | Type | What it means |
|---|---|---|
| P&L $ | Number | The position's P&L: unrealized while it's open, realized once it's closed. |
| P&L % | Number | The position's P&L as a percentage of its original structure's premium, not counting rolls, whether it's open or closed. Unknown if there's no premium to divide by. |
| P&L % of Total Premium | Number | The position's P&L as a percentage of its total premium: the original plus the net credit or debit any rolls added, whether it's open or closed. Unknown if there's no premium to divide by. |
| Delta | Number | The position's net delta. |
| Template ID | Text | Which template opened the position, picked from a list of your templates. |
| Is Open | Yes/No | Whether the position is open (false means it closed today). |
An aggregate covers today's positions, open and closed, which is what Is Open is for. A Close positions filter with no conditions closes every position in scope.
Functions
In a formula you can wrap any value in a function: abs( (absolute value), min( and max( (the smaller or larger of two or more values), and round(. Each completes like a name as you type, and the closing ) is added for you. A By steps value isn't typed; build it with a steps table instead.