4 of 4
5 min read

Actions Overview

What actions to take when conditions are met

Actions Overview

Actions define what happens when your rule conditions are satisfied. GreeksLab provides four powerful actions that give you complete control over position management throughout the trading lifecycle.

Understanding Actions

Actions are the "THEN" part of your rule logic. When all conditions in a rule are met, the specified action executes automatically during backtesting.

Action Formula: IF (conditions are met) THEN (execute action)

💡 Example:
Rule Example:
  • Conditions: Time = 9:31 AM AND VIX > 20
  • Action: Open Position
  • Result: New position created when both conditions are true

Available Actions

1. Open Position

Purpose: Creates a new position based on your position template

Open Position

When to Use:

  • Entry rules that initiate new trades
  • Adding positions when market conditions are favorable
  • Scaling into positions over time

How It Works:

  • Uses your strategy's position template to determine legs
  • Executes all legs of the position simultaneously

Parameters:

  • Position Multiplier - The position multiplier scales the entire position. This determines how many contracts of each leg will be traded.
  • Minimum Premium - The minimum premium is calculated as the expected credit for the position divided by the multiplier. The setting is ignored for positions opened for debit.
💡 Example:
Open Position Action:
  • Template: Iron Condor (4 legs)
  • Triggers: At 9:31 AM when VIX > 20
  • Result: Full Iron Condor position opened with all 4 legs

Best Practices:

  • Keep entry conditions specific but not overly restrictive
  • Test position sizing thoroughly
  • Consider market liquidity when timing entries
  • Use time-based filters to avoid opening positions near market close

2. Close Position

Purpose: Exits an entire existing position by closing all legs

Close Position

When to Use:

  • Profit target management rules
  • Stop loss protection rules
  • Time-based exit rules
  • Risk management scenarios

How It Works:

  • Closes all legs of the selected position
  • Executes market orders for immediate exit
  • Calculates final P&L for the position

Parameters:

  • Part to close - The part of the current position to close. If the resulting order is not a whole number of options, it will be rounded down to the nearest whole number.
💡 Example:
Close Position Action:
  • Trigger: Position profit >= $100 OR Position loss >= -$50
  • Result: All legs of the position are closed immediately
  • P&L: Final profit/loss is recorded

Best Practices:

  • Set realistic profit targets based on historical performance
  • Use time-based exits to avoid increasing gamma risk
  • Consider market hours when setting exit conditions

3. Close Legs

Purpose: Selectively closes specific legs of a multi-leg position

Close Legs

When to Use:

  • Partial profit taking strategies
  • Risk reduction without full exit
  • Converting multi-leg positions to simpler structures
  • Managing individual leg performance

How It Works:

  • You specify which legs to close
  • Only selected legs are closed, others remain open
  • Remaining legs continue to be managed by other rules
💡 Example:
Close Legs Action:
  • Position: Iron Condor (4 legs)
  • Trigger: Short call leg shows 50% profit
  • Action: Close legs 1 and 2 (call spread side)
  • Result: Position becomes Iron Put spread

Best Practices:

  • Use for profit-taking on profitable legs while keeping others
  • Consider the resulting position structure after partial closure
  • Plan follow-up rules for remaining legs
  • Monitor Greeks changes after partial closure

4. Roll Leg

Purpose: Adjusts a specific position leg to a new strike

Roll Leg

When to Use:

  • Strike adjustments when position moves against you
  • Converting losing positions to potentially profitable ones

Overview: Roll Leg is the most advanced action, allowing you to modify existing position legs rather than simply opening or closing them.

Common Roll Scenarios:

  • Strike Roll: Move a leg to a different strike price
💡 Example:
Roll Leg Example:
  • Position: Short Put at $100 strike and Short Call at $110 strike
  • Market Movement: Stock drops to $100
  • Roll Action: Roll call from $110 to $100 strike
  • Result: Collect premium and reduce position delta

Basic Parameters:

  • Leg to Roll: Which leg to roll
  • Minimum Premium: Set the minimum premium per option contract (in dollars) that you want to collect when rolling the leg. This ensures you collect enough premium to justify the roll.
  • Roll Target Variable: Choose what you want to control when rolling the leg.
  • Target Expression: Create an expression that defines your rolling goal. Think of it as a math equation where your target variable is the unknown.
  • Validation Constraints: Validation constraints prevent unwanted situations by checking leg strike relationships after the roll, such as potential inversions.
  • Max Executions: Maximum number of times roll leg action can be executed

Learn more about rolling

Best Practices

General Action Guidelines

  • Be Specific: Choose actions that match your exact intent
  • Test Thoroughly: Validate action logic in backtesting before live trading
  • Plan Sequences: Consider how actions interact with each other
  • Monitor Greeks: Understand how actions affect position risk characteristics

Rule Interaction

⚠️ Important:
Actions from different rules can affect the same position. Design rules carefully and set rule priorities to avoid conflicts.

Action Timing

  • Entry Actions: Triggered once per position
  • Management Actions: Some actions can trigger multiple times per position

Next Steps

Ready to implement specific actions? Explore these detailed guides:

Or return to the Strategy Building Guide to see how actions fit into your complete trading strategy.

On This Page

Last updated: 9/9/2025