3 of 4
5 min read

Entry and Management Rules Overview

When to enter, exit, and adjust positions

Entry and Management Rules Overview

Rules are the core building blocks of your trading strategy in GreeksLab. A rule combines conditions (when something should happen) with an action (what should happen) to create automated trading logic.

Understanding Rules

What is a Rule?

Rule form example

A rule consists of two main components:

  1. Conditions - The criteria that must be met (e.g., "VIX > 20" or "Time = 9:31 AM")
  2. Action - What happens when conditions are satisfied (e.g., "Open Position" or "Close Position")

Rule Formula: IF (ALL conditions are true) THEN (execute action)

⚠️ Important:
All conditions in a rule must be true for the action to trigger.

💡 Example:
Rule Example:
  • Condition: Time equals 9:31 AM AND VIX > 20
  • Action: Open Iron Condor Position
  • Result: Position opens automatically when both conditions are true

Types of Rules

GreeksLab supports two main types of rules:

Entry Rules

  • Purpose: Control when new positions are opened
  • Action: Opens a position based on your position template
  • Timing: Evaluated continuously during market hours
  • Example: "Open position at 9:31 AM when VIX > 20"

Management Rules

  • Purpose: Control when existing positions are modified or closed
  • Actions: Close position, roll a leg, or close specific legs
  • Timing: Evaluated for each open position
  • Example: "Close position when profit reaches $100"

Condition Types

GreeksLab offers two ways to create conditions:

Preset Conditions

  • Pre-built condition templates for common scenarios
  • Easy-to-use dropdown selections and input fields
  • Examples: Market Time, VIX Level, Position Profit
  • Best for: Beginners and standard trading setups

Learn more

Custom Expressions

  • Advanced condition building using mathematical expressions
  • Full access to engine data fields and complex AND/OR logic
  • Best for: Advanced users with specific requirements
💡 Example:
Custom expressions can handle complex logic like "(VIX > 30 AND Time > 14:00) OR Position Loss > $500"

Learn more

Actions Overview

Actions define what happens when rule conditions are satisfied:

  • Open Position: Creates new position from template
  • Close Position: Exits existing position
  • Close Legs: Exits specific position legs
  • Roll Position: Adjusts a leg to new strike

Learn more

How Rules Work

Rule Evaluation

Rules are evaluated based on their conditions:

  • All conditions must be true for the rule action to trigger
  • Preset conditions use simple AND logic (all must be satisfied)
  • Custom expressions can use complex AND/OR logic within a single condition
  • Rules are evaluated continuously during simulated market hours
💡 Example:
Rule Examples:
  • Simple: "Time = 9:31 AND VIX > 20" → All conditions must be true
  • Complex: "(Time = 9:31 OR Time = 10:31) AND VIX > 20" → Custom expression with OR logic

Best Practices

Entry Rules

  • Start simple: Begin with basic time-based entry rules
  • Add filters gradually: Layer in market condition filters
  • Test thoroughly: Validate rule logic works as expected
  • Avoid over-fitting: Don't make entry conditions too restrictive

Management Rules

  • Always include stop loss: Protect against large losses
  • Set profit targets: Don't let winners turn into losers
  • Use time-based exits: Avoid holding positions indefinitely
  • Layer multiple rule types: Combine profit, loss, and time-based management

Next Steps

Ready to dive deeper? Explore these related topics:

  • Conditions - Detailed guide to available condition types
  • Actions - Complete reference for position actions and their parameters

Or return to the Strategy Building Guide to see how rules fit into the complete strategy framework.

On This Page

Last updated: 9/9/2025