2.15

📋 Reguły tradingu

Automatyczne reguły handlowe i alerty

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 account value in the rule settings. The app warns you as soon as you cross this limit. Math background: Chapter 6.0 — The 1R Rule.
  2. No adding to losers. If a trade is red, you do NOT double down (no "averaging down"). Turn the rule on → the app warns you on violation. Background on this trap: Ch. 6 Losing Streak.
  3. A journal entry is mandatory for every trade. Entry reason + emotion + rationale. No journal, no trade. No review, no learning. Template: Mindset Ch. Module 3.

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

2. Czym są reguły tradingowe?

Reguły tradingowe to predefiniowane warunki, które pomagają ci handlować zdyscyplinowanie. System automatycznie monitoruje twoje pozycje i wysyła alerty, gdy reguła jest wyzwalana. Dzięki temu nigdy nie zapomnisz o ważnej akcji.

System reguł tradingowych:
• Automatycznie przypomina o ważnych regułach
• Ostrzega o naruszeniach limitów ryzyka
• Pomaga dokumentować i analizować przestrzeganie reguł
• Obsługuje różne style tradingowe (opcje, akcje itp.)
✨

Dlaczego reguły są ważne?

Większość traderów ma reguły w głowie, ale zapomina o nich w gorączce chwili. Przykład: "Zamknij przy 50% zysku" - ale potem masz nadzieję na więcej i przegapiasz wyjście. Reguły tradingowe przypominają ci automatycznie!

"Plan your trade, trade your plan" - Z systemem reguł ta zasada staje się rzeczywistością.

4. Architektura: Dwa wymiary

System reguł opiera się na dwóch podstawowych wymiarach:

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

5. Wymiar 1: Źródło reguły

🔧 Presety systemowe
Predefiniowane reguły z systemu, które możesz włączyć jednym kliknięciem. Oparte są na sprawdzonych praktykach tradingowych i utrzymywane przez zespół Singularity Trader.

Przykłady:
• "50% Profit Take" - Zamknij przy 50% maksymalnego zysku
• "21 DTE Management" - Ostrzeżenie przy 21 dniach do wygaśnięcia
• "200% Stop Loss" - Zamknij przy 2x stracie premii

✏️ Zdefiniowane przez użytkownika (Custom)
Twoje własne reguły, które tworzysz, aby dokładnie pasowały do twojego stylu tradingowego. Sam definiujesz nazwę, warunek i akcję.

6. Wymiar 2: Zakres (Zastosowalność)

Każda reguła ma zakres, który określa, do których pozycji się odnosi:

ZakresPrzykładowa regułaPrzypadek użycia
🎯 Pozycja"Sprzedaj tę pozycję AAPL przy +20%"Indywidualny plan transakcji
🏦 Konto"Maks. 30% siły nabywczej na tym koncie"Konserwatywne konto IRA
💼 Portfel"Nigdy więcej niż 5% w jednej pozycji"Ogólna reguła ryzyka

7. 🎯 Reguły pozycji szczegółowo

Reguły pozycji dotyczą jednej konkretnej pozycji. Pozwalają zdefiniować indywidualny plan dla każdej transakcji.

Typowe reguły pozycji:
• Cena stop-loss - np. "Sprzedaj, jeśli cena spadnie poniżej $150"
• Cel take-profit - np. "Zamknij przy +20%"
• Na podstawie DTE - np. "Zamknij przy 14 DTE"
• Ostrzeżenie ITM - np. "Roluj, jeśli opcja wejdzie ITM"
• Indywidualny plan transakcji

Przypadek użycia: Otwierasz transakcję i od razu ustawiasz, kiedy ją zamknąć lub dostosować. System przypomni ci, gdy warunek zostanie spełniony.

8. 🏦 Reguły konta szczegółowo

Reguły konta dotyczą jednego konta brokerskiego. Pomagają prowadzić różne strategie na konto.

Typowe reguły konta:
• Maks. wykorzystanie siły nabywczej % - np. "Nigdy powyżej 50%"
• Maks. otwarte pozycje - np. "Maks. 10 pozycji"
• Dozwolone klasy aktywów - np. "Tylko akcje, bez opcji"
• Maks. wielkość pozycji na tym koncie
• Reguły marginu specyficzne dla konta

Przypadek użycia: Masz konserwatywne konto IRA i agresywne konto tradingowe. Reguły konta zapewniają przestrzeganie różnych profili ryzyka.

9. 💼 Reguły portfela szczegółowo

Reguły portfela obowiązują na wszystkich kontach. Chronią twój łączny majątek.

Typowe reguły portfela:
• Limit łącznej ekspozycji - np. "Maks. 200% kapitału"
• Dywersyfikacja sektorowa - np. "Maks. 20% w technologii"
• Maks. wielkość pozycji (łącznie) - np. "Maks. 5% w jednej akcji"
• Limity korelacji - np. "Ostrzeżenie, gdy zbyt wiele podobnych transakcji"
• Ogólne reguły ryzyka

Przypadek użycia: Bez względu na to, ile masz kont, te reguły zapewniają bezpieczeństwo całego portfela.

10. Kategorie reguł

Reguły są zorganizowane według kategorii w zależności od momentu zastosowania:

📥 Reguły wejścia (przed otwarciem)
Sprawdzenia przed otwarciem pozycji:
• 45 DTE Entry - Opcje z ~45 dniami do wygaśnięcia
• Delta 0.30 - Short puts przy delcie 0.30
• IV Rank > 50 - Sprzedawaj tylko gdy IV jest wysokie
• Unikaj wyników - Brak transakcji przez okres wyników

📤 Reguły wyjścia/zarządzania
Kiedy zamknąć lub dostosować pozycje:
• 50% Profit Take - Zamknij przy 50% maks. zysku
• 21 DTE Management - Ostrzeżenie przy 21 dniach do wygaśnięcia
• 200% Stop Loss - Zamknij przy 2x stracie premii
• Roll at ITM

⚠️ Reguły ryzyka
Limity na poziomie portfela:
• Reguła 1-2% - Maks. ryzyko na transakcję
• 5% wielkości pozycji - Maks. na pozycję
• 50% siły nabywczej - Nigdy nie przekraczaj

🧠 Reguły psychologii
Ochrona przed emocjonalnym tradingiem:
• 3 przegrane = przerwa
• Brak revenge tradingu
• Plan przed transakcją

11. Architektura systemu: Silnik reguł

Silnik reguł to serce systemu. Stale monitoruje wszystkie twoje pozycje i sprawdza, czy reguły są wyzwalane:

┌─────────────────────────────────────────────────────────────────┐
│                        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   │    │
│  └───────────┘  └───────────┘  └───────────┘  └───────────┘    │
└─────────────────────────────────────────────────────────────────┘

Silnik regularnie sprawdza wszystkie aktywne reguły i wyzwala odpowiednią akcję, gdy warunki są spełnione.

12. Integracja z platformą

Reguły tradingowe są zintegrowane w różnych miejscach na platformie:

StronaIntegracja
DashboardWidget "Wymagana akcja" z aktywnymi alertami reguł
Szczegóły pozycjiPokaż aktywne reguły dla tej pozycji
Wejście w transakcjęSprawdzenie przed otwarciem (reguły ryzyka)
WatchlistaKolumna sygnałów na podstawie reguł wejścia
PowiadomieniaPush/E-mail gdy reguła się wyzwala
Dziennik transakcjiOcena przestrzegania reguł na transakcję

13. Typy warunków

Dostępne są następujące typy warunków dla reguł:

TypOpisAktywa
PROFIT_PCTZysk w %Wszystkie
LOSS_PCTStrata w %Wszystkie
DTEDni do wygaśnięciaOpcje
DELTAWartość deltaOpcje
IV_RANKIV Rank/PercentylOpcje
POSITION_SIZE_PCTPozycja > X% portfelaRyzyko
BUYING_POWER_PCTWykorzystanie BP > X%Ryzyko
EARNINGS_DTEWyniki za X dniWszystkie

14. Status: Koncepcja

⚠️ Uwaga: System reguł tradingowych jest obecnie w fazie koncepcyjnej. Opisane tutaj funkcje zostaną zaimplementowane w przyszłych wersjach.

Twoja opinia jest mile widziana, aby pomóc optymalnie ukształtować funkcje! Szczegółową dokumentację techniczną znajdziesz w docs/concepts/TRADING-RULES.md.

15. Dashboard Widget "Action Needed" ✅

On the dashboard you see all cycles where a strategy rule has been triggered — this is the currently implemented Phase 1 interface:

┌─────────────────────────────────────────────────────────┐
│ ⚠️ Action Needed (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]                        │
│                                                         │
└─────────────────────────────────────────────────────────┘

Every alert shows: symbol, rule name, current value, and action buttons. The color (🟡 yellow, 🔴 red) shows the urgency.

16. 🔜 Planned Interface: Position Detail with Rules (Future Phase)

🔜 This UI mockup describes a planned future phase — not yet implemented. In Phase 1, triggers are visible in the "Action Needed" dashboard widget, not in the position detail.

┌─────────────────────────────────────────────────────────┐
│ AAPL 180 PUT 2025-01-17 — Planned View                  │
├─────────────────────────────────────────────────────────┤
│ ...Position Details...                                  │
│                                                         │
│ 📋 RULES FOR THIS POSITION  🔜 planned                 │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ ✅ Strategy: 50% Profit Take (active)              │ │
│ │ ✅ Strategy: 21 DTE Management (active)            │ │
│ │ ➕ Add position-specific rule... 🔜                │ │
│ └─────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────┘

In Phase 1, you see triggers in the "Action Needed" dashboard widget. A position-specific rules view directly in the position detail — with the option to create position-only rules — is planned for a later phase.

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% 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. risk_rule_presets (system presets)
Rules defined by the admin that all users can add to their strategies.

2. strategy_risk_rules (strategy risk rule set)
Contains activated presets and your own custom rules per strategy — i.e. the concrete risk rule set applied to all cycles of that strategy.

3. risk_rule_triggers (trigger log)
Logs when which rule fired for which cycle and how the user responded (Acknowledge, Snooze, Ignore).

This structure enables:
• Fast checking of all active strategy rules against open cycles
• Traceability of all trigger events
• A foundation for future compliance analysis per strategy

19. Wheel Strategy Rules

Special rules exist for the popular wheel strategy:

RuleDescription
Stocks you want to ownOnly wheel stocks you would want to 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

✅ Phase 1 — Strategy→Cycle Scope (live, May 2026)
• Attach rules from system presets or your own custom rules to a strategy
• Automatic checking of all open trade cycles of the strategy (incl. tag inheritance)
• "Action Needed" dashboard widget with active triggers
• In-app, push, and email notifications for new triggers
• Acknowledge, snooze, or ignore triggers

🔜 Phase 2 — Account Scope (planned)
• Apply rules to a broker account (e.g. max. buying power usage)
• Account-specific risk limits

🔜 Phase 3 — Portfolio Scope (planned)
• Portfolio-wide rules across all accounts
• Sector diversification, total exposure limits

🔜 Phase 4 — Extended Integration (planned)
• Trade Entry: risk check before opening
• Trade Journal: compliance score per trade

21. Open Questions & Feedback

We want to build this system in the best possible way and would love 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 ship as system presets?

Send your feedback to the support team or post it in the forum!
✨

Status: Phase 1 Active

✅ Phase 1 is live (May 2026): You can now attach risk rules directly to your strategies. Open a strategy → tab "Risk Rules" → activate a preset or create your own rule. All open trade cycles of this strategy are monitored automatically. Triggers appear in the "Action Needed" dashboard widget and as a notification.

Account and portfolio scope follow in later phases. Your feedback helps us build out the presets and condition types in the best way possible!

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 you at a glance whether current market conditions are favorable for new trades.

What's shown?
Three categories, each with its own traffic light (green/yellow/red):

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

Majority logic instead of "worst indicator wins": Each category combines its individual indicators by majority — if 2 out of 3 are green, the category is green. That way, a single red outlier no longer drags down an entire category.

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

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

Market breadth measures whether a market move is being carried by many stocks or just a handful of heavyweights. An S&P 500 that rises because 7 mega-caps are rising is less healthy than one that rises because 400 stocks are rising.

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

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

Where you'll see it:
• 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

Interpretation in one sentence: Green breadth = "the market is carrying you"; red breadth = "you're swimming against the current".

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

The COT Report (Commitments of Traders) is published every week by the US regulator CFTC and shows the net positions of large institutional traders in futures markets. Singularity Trader imports this data automatically and presents it to you in a digestible way.

Why is this interesting?
When commercial hedgers (e.g. gold miners, oil companies) are historically rarely positioned as heavily long as now — that's often a signal that they expect a bottom to form. When large speculators are extremely bullish, a trend reversal is often looming.

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 the 1-year history. Helps you put absolute numbers into context.
• Per-market detail view — historical trends of commercial, large-speculator, and small-trader positions over the years, including a price chart overlay.
• Related instruments — e.g. when you look at gold COT, you also see silver, platinum, GLD ETF flows.
• Signal labels — "Commercial Extreme Long" / "Speculator Extreme Short" etc., when a market reaches its 5-year extreme.

The data is updated every Friday evening (after the CFTC release). You can reach the page via the sidebar Market Analysis → COT.