20

📋 Trading Rules

Automatic trading rules and alerts

1. 🌱 Your First 3 Rules — Starter Set

Trading rules are a powerful tool — but without a starting point, they can feel overwhelming. If you're just getting started, these three rules are all you need:

  1. Max 2% risk per trade. Set a hard stop at 2% of your current portfolio value in the rule settings. The app warns you as soon as you exceed this limit. Mathematical background: Chapter 6.0 — The 1R Rule.
  2. No averaging down in a losing trade. If a trade is in the red, do NOT double down (no "Averaging Down"). Activate the rule → the app warns you if violated. Background on this trap: Ch. 6 Losing Streak.
  3. Mandatory journal entry for every trade. Entry reason + emotion + rationale. No journal, no trade. No review, no learning. Template: Ch. Mindset Module 3.

After 3 months, you can expand your ruleset with advanced rules from the sections below — earnings filters, correlation limits, max positions per day. But first: these three, and nothing else.

2. What are Trading Rules?

Trading rules are predefined conditions that help you trade with discipline. The system automatically monitors your positions and sends alerts when a rule is triggered. So you never forget an important action.

The Trading Rules System:
• Automatically reminds you of important rules
• Warns about violations of risk limits
• Helps document and analyze rule compliance
• Supports different trading styles (options, stocks, etc.)

Why are Rules Important?

Most traders have rules in their head but forget them in the heat of the moment. Example: "Close at 50% profit" - but then you hope for more and miss the exit. Trading rules remind you automatically!

"Plan your trade, trade your plan" - With the rule system, this principle becomes reality.

4. Architecture: The Two Dimensions

The rule system is based on two fundamental dimensions:

┌─────────────────────────────────────────────────────────────────┐
│                        RULE DIMENSIONS                          │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  SOURCE                        SCOPE (Applicability)            │
│  ┌──────────────┐              ┌──────────────────────────┐    │
│  │ System       │              │ 🎯 Position              │    │
│  │ (Presets)    │              │    A specific            │    │
│  ├──────────────┤              │    position              │    │
│  │ User         │              ├──────────────────────────┤    │
│  │ (Custom)     │              │ 🏦 Account               │    │
│  └──────────────┘              │    A broker account      │    │
│                                ├──────────────────────────┤    │
│                                │ 💼 Portfolio             │    │
│                                │    All accounts          │    │
│                                └──────────────────────────┘    │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

5. Dimension 1: Rule Source

🔧 System Presets
Predefined rules from the system that you can enable with one click. These are based on proven trading practices and maintained by the Singularity Trader team.

Examples:
• "50% Profit Take" - Close at 50% of max profit
• "21 DTE Management" - Warn at 21 days remaining
• "200% Stop Loss" - Close at 2x premium loss

✏️ User-defined (Custom)
Your own rules that you create to match your trading style exactly. You define name, condition, and action yourself.

6. Dimension 2: Scope (Applicability)

Each rule has a scope that determines which positions it applies to:

ScopeExample RuleUse Case
🎯 Position"Sell this AAPL position at +20%"Individual trade plan
🏦 Account"Max 30% buying power in this account"Conservative IRA account
💼 Portfolio"Never more than 5% in one position"General risk rule

7. 🎯 Position Rules in Detail

Position rules apply to one specific position. They let you define an individual plan for each trade.

Typical Position Rules:
• Stop-Loss Price - e.g., "Sell if price falls below $150"
• Take-Profit Target - e.g., "Close at +20%"
• DTE-based - e.g., "Close at 14 DTE"
• ITM Warning - e.g., "Roll if option goes ITM"
• Individual trade plan

Use Case: You open a trade and immediately set when to close or adjust it. The system reminds you when the condition is met.

8. 🏦 Account Rules in Detail

Account rules apply to one broker account. They help you run different strategies per account.

Typical Account Rules:
• Max Buying Power Usage % - e.g., "Never over 50%"
• Max Open Positions - e.g., "Max 10 positions"
• Allowed Asset Classes - e.g., "Stocks only, no options"
• Max Position Size in this account
• Account-specific margin rules

Use Case: You have a conservative IRA account and an aggressive trading account. Account rules ensure you follow different risk profiles.

9. 💼 Portfolio Rules in Detail

Portfolio rules apply across all accounts. They protect your total wealth.

Typical Portfolio Rules:
• Total Exposure Limit - e.g., "Max 200% of capital"
• Sector Diversification - e.g., "Max 20% in Tech"
• Max Position Size (total) - e.g., "Max 5% in one stock"
• Correlation Limits - e.g., "Warning if too many similar trades"
• Overall risk rules

Use Case: No matter how many accounts you have, these rules ensure your total portfolio stays safe.

10. Rule Categories

Rules are organized by category based on when they apply:

📥 Entry Rules (before opening)
Checks before opening a position:
• 45 DTE Entry - Options with ~45 days remaining
• Delta 0.30 - Short puts at delta 0.30
• IV Rank > 50 - Only sell when IV is high
• Avoid Earnings - No trades over earnings

📤 Exit/Management Rules
When to close or adjust positions:
• 50% Profit Take - Close at 50% of max gain
• 21 DTE Management - Warn at 21 days left
• 200% Stop Loss - Close at 2x premium loss
• Roll at ITM

⚠️ Risk Rules
Portfolio-wide limits:
• 1-2% Rule - Max risk per trade
• 5% Position Size - Max per position
• 50% Buying Power - Never exceed

🧠 Psychology Rules
Protect from emotional trading:
• 3 Losers = Break
• No Revenge Trading
• Plan Before Trade

11. System Architecture: The Rule Engine

The rule engine is the heart of the system. It continuously monitors all your positions and checks if rules are triggered:

┌─────────────────────────────────────────────────────────────────┐
│                        RULE ENGINE                              │
├─────────────────────────────────────────────────────────────────┤
│  Rule Definition (Admin/User)                                   │
│  • Name, Description                                            │
│  • Type: Entry / Exit / Management / Risk                       │
│  • Condition (e.g., DTE <= 21)                                  │
│  • Action: Alert / Warning / Block                              │
│  • Asset Type: Option / Stock / All                             │
│  • Scope: Position / Account / Portfolio                        │
├─────────────────────────────────────────────────────────────────┤
│                              ↓                                  │
│  ┌───────────┐  ┌───────────┐  ┌───────────┐  ┌───────────┐    │
│  │ Dashboard │  │ Watchlist │  │  Entry    │  │  Alerts   │    │
│  │  Widget   │  │  Signals  │  │  Check    │  │  System   │    │
│  └───────────┘  └───────────┘  └───────────┘  └───────────┘    │
└─────────────────────────────────────────────────────────────────┘

The engine regularly checks all active rules and triggers the appropriate action when conditions are met.

12. Integration into the Platform

Trading rules are integrated in various places on the platform:

PageIntegration
DashboardWidget "Action Needed" with active rule alerts
Position DetailShow active rules for this position
Trade EntryCheck before opening (risk rules)
WatchlistSignal column based on entry rules
NotificationsPush/Email when rule triggers
Trade JournalRule compliance score per trade

13. UI Preview: Activating System Presets

Here is the planned interface for activating system presets:

┌─────────────────────────────────────────────────────────┐
│ ⚙️ Trading Rules                                         │
├─────────────────────────────────────────────────────────┤
│                                                         │
│ 📋 SYSTEM PRESETS                                       │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ ☑️ 50% Profit Take                                  │ │
│ │    Close at 50% profit                              │ │
│ │    Scope: [Portfolio ▼]                             │ │
│ ├─────────────────────────────────────────────────────┤ │
│ │ ☑️ 21 DTE Management                                │ │
│ │    Warn at 21 days remaining                        │ │
│ │    Scope: [Portfolio ▼]                             │ │
│ ├─────────────────────────────────────────────────────┤ │
│ │ ☐ 200% Stop Loss                                    │ │
│ │    Close at 200% loss                               │ │
│ │    Scope: [—]                                       │ │
│ └─────────────────────────────────────────────────────┘ │
│                                                         │
│ ➕ Create Custom Rule                                   │
│                                                         │
└─────────────────────────────────────────────────────────┘

Check the checkbox to enable a preset. The "Scope" dropdown determines whether the rule applies to your portfolio, an account, or a position.

14. UI Preview: Create a Custom Rule

Here is how to create your own individual rule:

┌─────────────────────────────────────────────────────────┐
│ ➕ New Rule                                              │
├─────────────────────────────────────────────────────────┤
│                                                         │
│ Name: [My Stop-Loss Rule____________________]           │
│                                                         │
│ Scope:                                                  │
│ ○ 💼 Portfolio (all accounts)                          │
│ ● 🏦 Account: [Interactive Brokers ▼]                  │
│ ○ 🎯 Position: [Select position...]                    │
│                                                         │
│ When:                                                   │
│ [Loss %_____▼] [>=] [15__] [%]                         │
│                                                         │
│ Then:                                                   │
│ [🔔 Send Alert___▼]                                    │
│                                                         │
│ Asset Type: ○ All  ● Stocks  ○ Options                 │
│                                                         │
│              [Cancel]  [💾 Save]                       │
└─────────────────────────────────────────────────────────┘

You define: Name, Scope, Condition (When…), Action (Then…) and Asset Type.

15. UI Preview: Dashboard Widget "Action Required"

On the dashboard you see all positions where a rule has been triggered:

┌─────────────────────────────────────────────────────────┐
│ ⚠️ Action Required (3)                                  │
├─────────────────────────────────────────────────────────┤
│                                                         │
│ 🟡 AAPL 180 PUT         50% profit reached (52%)       │
│    Rule: 50% Profit Take                                │
│    [Close] [Ignore]                                     │
│                                                         │
│ 🔴 MSFT 400 CALL        21 DTE reached (18 days)       │
│    Rule: 21 DTE Management                              │
│    [Roll] [Close] [Ignore]                              │
│                                                         │
│ 🟡 TSLA Stock           Stop-loss nearly reached (-9%) │
│    Rule: 10% Stop-Loss                                  │
│    [Sell] [Adjust Stop] [Ignore]                        │
│                                                         │
└─────────────────────────────────────────────────────────┘

Each alert shows: Symbol, rule name, current value, and action buttons. The color (🟡 yellow, 🔴 red) indicates urgency.

16. UI Preview: Position Detail with Rules

In the detail view of a position you see which rules are active:

┌─────────────────────────────────────────────────────────┐
│ AAPL 180 PUT 2025-01-17                                 │
├─────────────────────────────────────────────────────────┤
│ ...Position Details...                                  │
│                                                         │
│ 📋 RULES FOR THIS POSITION                             │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ ✅ Portfolio: 50% Profit Take (active)             │ │
│ │ ✅ Portfolio: 21 DTE Management (active)           │ │
│ │ ➕ Add rule for this position...                    │ │
│ └─────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────┘

You see all rules that apply to this position (portfolio-wide, account-wide, or position-specific). With ➕ you can directly create a new rule for this position.

17. Condition Types

The following condition types are available for rules:

TypeDescriptionAsset
PROFIT_PCTProfit in %All
LOSS_PCTLoss in %All
DTEDays to ExpirationOptions
DELTADelta valueOptions
IV_RANKIV Rank/PercentileOptions
POSITION_SIZE_PCTPosition > X% of portfolioRisk
BUYING_POWER_PCTBP Usage > X%Risk
EARNINGS_DTEEarnings in X daysAll

18. Data Architecture (Simplified)

For the technically curious: the system stores rules in three tables:

1. trading_rule_presets (System Presets)
Admin-defined rules that all users can enable.

2. user_trading_rules (User Rules)
Contains activated presets and custom rules for each user, with scope assignment.

3. trading_rule_triggers (Trigger Log)
Logs when which rule was triggered and how the user responded (closed, ignored, etc.).

This structure enables:
• Fast checking of all active rules
• Analysis of rule compliance over time
• Compliance reporting in the trade journal

19. Wheel Strategy Rules

For the popular Wheel Strategy there are special rules:

RuleDescription
Only Stocks You Want to OwnOnly run the Wheel on stocks you would hold long-term
Cash-SecuredAlways keep enough cash for assignment
CC at ResistancePlace Covered Calls at technical resistance
CC Not Below Cost BasisNever sell Covered Calls below your purchase price

20. Implementation Phases

The Trading Rules system will be developed in phases:

Phase 1: Foundation
• Create database tables
• Define system presets
• Admin page for preset management

Phase 2: User Rules
• User rules UI
• Activation of system presets
• Create custom rules

Phase 3: Rule Engine
• Automatic checking of all rules
• Trigger detection
• Logging of all activations

Phase 4: Alerts & Notifications
• Dashboard widget "Action Required"
• Email notifications
• Push notifications (optional)

Phase 5: Integration
• Position detail: show active rules
• Trade entry: risk checks
• Trade journal: compliance analysis

21. Open Questions & Feedback

We want to design the system optimally and welcome your feedback on these questions:

1. Auto-Execution: Should rules also be able to execute trades automatically (e.g., auto-close)?

2. Check Interval: How often should the rule engine run (real-time vs. every 5 min vs. hourly)?

3. Community Rules: Should rules be shareable between users?

4. Which Presets: Which rules should be included as system presets?

Send your feedback to the support team or in the forum!

Status: Concept

⚠️ Note: The Trading Rules system is currently in concept phase. The features described here will be implemented in future versions.

Your feedback is welcome to help shape the features optimally! Detailed technical documentation can be found at docs/concepts/TRADING-RULES.md.

23. Trading Lights — Traffic Light System Before the Trade

Trading Lights is your market status dashboard in green/yellow/red. You'll find it on the dashboard and as a sidebar widget. It shows at a glance whether current market conditions are favorable for new trades.

What is displayed?
Three categories, each with its own traffic light (green/yellow/red):

Macro Environment — Fear & Greed Index, VIX, and NYSE Market Breadth as a third indicator (see next section).
Sector Context — your underlying's sector compared to the overall market (RSI, SMA200 status).
Underlying Status — the specific market you're looking at (trend, volatility, recent movements).

Majority logic instead of "worst indicator wins": Each category summarizes its indicators by majority — if 2 of 3 are green, the category is green. This prevents a single red outlier from negating an entire category.

Clicking on a traffic light opens a modal with beginner-friendly explanations for each indicator — what the value means, how it compares historically, and what actions are suggested.

24. NYSE Market Breadth — "How Many Stocks Are Actually Rising?"

Market breadth measures whether a market move is driven by many stocks or just a few heavyweights. An S&P 500 rising because 7 mega-caps are up is less healthy than one rising because 400 stocks are up.

Singularity Trader automatically calculates four NYSE breadth indicators every 3 hours:

A/D Ratio (Advance/Decline) — ratio of advancing to declining stocks on the NYSE. Values > 2.0 = broadly supported rally; < 0.5 = broad selloff.
McClellan Oscillator — smoothed breadth momentum indicator. Positive = broad upward thrust, negative = broad downward thrust. Zero-line crossings are classic signals.
NYSE > 50d MA — percentage of NYSE stocks above their 50-day average. > 70% = hot (risk of overheating), < 30% = cold (potential setup environment).
High/Low Ratio — ratio of new 52-week highs to lows. Divergences from the index are often early warning signals.

Where you see this:
• In the Trading Lights modal as the third macro indicator
• In the Markets tab as its own metric row
• On the dashboard under "Market Context"
• As a detail heatmap on the market analysis page

In one sentence: Breadth green = "The market is carrying you"; breadth red = "You're swimming against the current".

25. COT Analysis — What the Big Players Are Actually Doing

The COT Report (Commitments of Traders) is published weekly by the CFTC and shows net positions of large institutional traders in futures markets. Singularity Trader imports this data automatically and presents it in structured form.

Why is this interesting?
If Commercial Hedgers (e.g., gold mines, oil companies) are rarely this long historically — it's often a signal they expect a bottom. If Large Speculators are extremely bullish, a trend reversal is often imminent.

What you'll find:
Heatmap overview — all available futures markets (Gold, Oil, S&P, EUR, Bitcoin, …) with their current COT status
COT Index (52 weeks) — normalized: 0% = extreme bearish, 100% = extreme bullish in 1-year history
Detail view per market — historical charts of Commercial, Large Speculator, and Small Trader positions with price chart overlay
Related instruments — e.g., Gold COT also shows Silver, Platinum, GLD ETF flows
Signal labels — "Commercial Extreme Long" / "Speculator Extreme Short" etc., when a market hits its 5-year extreme

Data is updated every Friday evening (after CFTC release). Accessible via sidebar Market Analysis → COT.