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 writingFields you get
A template's rules, or a position's own rulesPosition, Leg, Underlying, Time
A strategy's rules, its calculated variables, and its multipliersTime, Underlying (by symbol), Account, Portfolio, Strategy, plus your variables
A calculated global variableTime, Underlying (by symbol), Account, Portfolio, plus other global variables
A Close positions filter, or an aggregate's Positions where and FieldPosition 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.

FieldTypeWhat it means
P&L %NumberProfit 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 PremiumNumberThe 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)NumberProfit 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)NumberProfit or loss in dollars across the whole position, including profit or loss already taken by rolls.
Delta (per lot)NumberNet 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)NumberNet position delta across all lots, its share-equivalent directional exposure. Unknown if any open leg has no delta quote.
Gamma (per lot)NumberNet position gamma for one lot. Unknown if any open leg has no gamma quote.
Gamma (whole position)NumberNet position gamma across all lots. Unknown if any open leg has no gamma quote.
Theta (/min, per lot)NumberNet position theta for one lot, as value lost per calendar minute. Unknown if any open leg has no theta quote.
Theta (/min, whole position)NumberNet position theta across all lots, per calendar minute. Unknown if any open leg has no theta quote.
Entry PriceNumberNet premium of the original structure when the position opened.
Initial PremiumNumberNet premium of the original structure, signed (credit or debit), not counting rolls.
Total PremiumNumberInitial premium plus the net credit or debit any rolls added.
Current PriceNumberCurrent mid-market value of the position.
Current Price (Bid)NumberCurrent bid-side value of the position.
Current Price (Ask)NumberCurrent ask-side value of the position.
Best P&L $ (per lot)NumberBest 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)NumberWorst P&L $ (whole position) for one lot.
Best P&L $ (whole position)NumberThe 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)NumberThe 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 %NumberBest P&L $ (whole position) as a percentage of the initial premium (same basis as P&L %).
Worst P&L %NumberWorst P&L $ (whole position) as a percentage of the initial premium.
Hours OpenNumberHours since the position opened.
Minutes OpenNumberMinutes since the position opened.
Minutes to ExpirationNumberMinutes 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 EntryNumberThe underlying's price when the position filled. Unknown if it could not be recorded at the fill.
Underlying Move Since EntryNumberHow 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 LegsNumberHow many of the position's legs are still open.
Lots (open)NumberHow 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.

FieldTypeWhat it means
P&L %NumberThe leg's profit or loss as a percentage of its initial premium, through any rolls.
P&L $ (per lot)NumberThe 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)NumberThe leg's profit or loss in dollars across all its lots, through any rolls.
Initial PremiumNumberThe leg's signed premium when it first opened, not counting rolls.
Total PremiumNumberThe leg's initial premium plus the net credit or debit its rolls added.
DeltaNumberThe leg's current delta, per contract as quoted — not adjusted for Buy/Sell or size.
GammaNumberThe leg's current gamma, per contract as quoted — not adjusted for Buy/Sell or size.
Theta (/min)NumberThe leg's current theta, as value lost per calendar minute, per contract as quoted — not adjusted for Buy/Sell or size.
IVNumberThe leg's current implied volatility, per contract as quoted — not adjusted for Buy/Sell or size.
StrikeNumberThe leg's strike price.
Distance to StrikeNumberHow 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 MoneyYes/NoWhether 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.
RollsNumberHow many times this leg has been rolled. "Rolls is 2 or more" lets a rule close instead of rolling a third time.
PriceNumberThe leg's current mid price.
BidNumberThe leg's current bid price.
AskNumberThe leg's current ask price.
Entry PriceNumberThe price the leg filled at when it opened.
Underlying at EntryNumberThe 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 EntryNumberHow 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)NumberThe leg's Best P&L $ (all lots) per lot of the position.
Worst P&L $ (per lot)NumberThe leg's Worst P&L $ (all lots) per lot of the position.
Best P&L $ (all lots)NumberThe highest P&L in dollars the leg has reached, through rolls; frozen once the leg closes.
Worst P&L $ (all lots)NumberThe lowest P&L in dollars the leg has reached, through rolls; frozen once the leg closes.
Best P&L %NumberLeg Best P&L $ (all lots) as a percentage of the leg's initial premium.
Worst P&L %NumberLeg Worst P&L $ (all lots) as a percentage of the leg's initial premium.
Type (C/P)C or PWhether the leg is a call or a put.
Is OpenYes/NoWhether the leg is currently open.

Underlying fields

FieldTypeWhat it means
LastNumberLast traded price of the underlying. For SPX and XSP outside regular hours, the futures-derived price (see below).
CloseNumberThe underlying's previous-session closing price.
OpenNumberThe underlying's opening price for the current session.
HighNumberThe highest price of the current session so far.
LowNumberThe lowest price of the current session so far.
Minutes to CloseNumberMinutes 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 DayNumberLast 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 %NumberThe 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.

FieldTypeWhat it means
Current TimeTimeThe current time in ET, on a 24-hour clock.
Minutes Since OpenNumberMinutes since the 9:30 AM ET open.
Day of WeekNumberThe weekday, where 0 = Monday through 6 = Sunday.
Market OpenYes/NoWhether 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.

FieldTypeWhat it means
Account ValueNumberTotal account value (net liquidation).
Buying PowerNumberAvailable buying power.
Maint. MarginNumberMaintenance margin requirement.
Excess LiquidityNumberEquity minus maintenance margin.

Portfolio fields

In a strategy's rules and in calculated variables. These summarize all your open positions at once.

FieldTypeWhat it means
Open PositionsNumberHow many positions are currently open.
Total Unrealized P&LNumberUnrealized profit or loss summed across all open positions.
Total Realized P&LNumberProfit or loss from positions closed today. Unknown if any of them has no recorded P&L.
Day P&LNumberThe day's total, unrealized plus realized. Unknown if either part is unknown.
Total DeltaNumberCombined delta across all open positions.
Total GammaNumberCombined gamma across all open positions. Unknown if any open leg has no gamma quote.
Total Theta (/min)NumberCombined theta across all open positions, per calendar minute. Unknown if any open leg has no theta quote.
Total PremiumNumberTotal premium (initial plus any roll credits or debits) summed across all open positions.
Last Entry Underlying PriceNumberThe underlying's price at your most recent entry among positions still open. Unknown while no position is open.
Last Entry TimeTextWhen your most recent still-open position opened, as a date-and-time.
SPX Move from Last EntryNumberHow 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.

FieldTypeWhat it means
My Open CountNumberThis strategy's open positions, plus any entry that's still being filled.
My Entries TodayNumberPositions this strategy has opened today, open or already closed.
Minutes Since My Last EntryNumberMinutes 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&LNumberRealized 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.

FieldTypeWhat it means
P&L $NumberThe position's P&L: unrealized while it's open, realized once it's closed.
P&L %NumberThe 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 PremiumNumberThe 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.
DeltaNumberThe position's net delta.
Template IDTextWhich template opened the position, picked from a list of your templates.
Is OpenYes/NoWhether 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.

Last updated