Логотип Trading Discipline

Trading Discipline

Сообщество
Shubhamkumartrichy
trading-discipline

Rules that protect an Indian trader from themselves: an account-level circuit breaker (daily 2%, weekly 5%, monthly 10% loss limits plus losing-streak cooldowns) read from the trade journal, a pre-trade gate (stop, rupee risk, R:R, written plan, revenge window, regime, F&O ban, ASM/GSM/T2T, results, circuit lock, expiry day, MIS cut-off) that returns PASS / PASS-WITH-WARNINGS / BLOCK before any order ticket, a performance review by setup, weekday, hour, segment and mistake, a weekly digest, and an opt-in decision log. discipline.py, stdlib only, offline. Use when the user asks: "should I take this trade", "can I trade today", "I've lost 3 in a row", "am I revenge trading", "check my trade before I place it", "daily loss limit", "review my journal / trades", "what's my worst setup", "weekly trading report", "why do I keep losing in F&O", or before any order is drafted.

Add to TypingMind

Обзор

ИздательShubhamkumartrichy
Репозиторийclaude-trading-skills-india
Название навыкаtrading-discipline
Звёзды
57
Форки
11
Файлы в комплекте
1
ЛицензияMIT
Ссылки
  • Инструкции в формате Markdown

    Модель загружает файл SKILL.md по мере необходимости, поэтому токены расходуются только при подходящем запросе.

  • Работает с любой большой языковой моделью

    Навыки ИИ — это обычный Markdown, а не код для конкретного поставщика, поэтому они работают с GPT, Claude, Gemini, Grok и локальными моделями.

  • Файлы в комплекте: 1

    Скрипты, шаблоны и справочные материалы, которые модель может читать во время работы. Файлы доступны только для чтения и никогда не выполняются.

  • Открытый исходный код

    Издатель навыка на GitHub — Shubhamkumartrichy. Перед установкой изучите исходные материалы.

Установка

Установите навык ИИ Trading Discipline в TypingMind, чтобы использовать его с любой LLM, или добавьте его в другой агент, который умеет читать SKILL.md.

1

Установка в TypingMind

TypingMind устанавливает навык прямо из его папки на GitHub: читает SKILL.md, собирает файлы ресурсов и сохраняет результат локально.

  1. Откройте приложение и перейдите в раздел «Плагины → Навыки».
  2. Выберите «Установить из GitHub».
  3. Вставьте указанную ниже ссылку на папку навыка и подтвердите установку.
    https://github.com/Shubhamkumartrichy/claude-trading-skills-india/tree/main/skills/trading-discipline
  4. Включите навык в каждом чате, где хотите его использовать.
Плагины → Навыки → Добавить навык → По ссылке GitHub, затем вставьте ссылку на папку и нажмите «Продолжить».
2

Установка в другом агенте

Любой агент с поддержкой формата Agent Skills может использовать этот навык — скопируйте папку в каталог навыков этого агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Shubhamkumartrichy/claude-trading-skills-india.git /tmp/claude-trading-skills-india
mkdir -p .claude/skills
cp -r /tmp/claude-trading-skills-india/skills/trading-discipline .claude/skills/trading-discipline
После копирования перезапустите Claude Code, чтобы загрузить новый навык.

Использование в TypingMind

Включите навык Trading Discipline в любом чате TypingMind, и дальше модель всё сделает сама. Его название и описание хранятся в системном промпте, а при появлении подходящего запроса модель сама загружает полные инструкции. Вам не нужно вызывать навык вручную, и до фактического использования он не расходует токены.

Модель сама загружает навык Trading Discipline, как только появляется подходящий для него запрос.

Работает с любой моделью ИИ

Навыки ИИ — это обычные инструкции в Markdown, а не код для конкретного поставщика, поэтому навык Trading Discipline не привязан к модели, для которой он был создан. Установите его один раз в TypingMind и используйте с GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama или локальной моделью, которую запускаете самостоятельно, — со своими ключами API.

  • Загружается только при необходимости

    Системный промпт содержит только название и описание. Инструкции загружаются при первом подходящем запросе, поэтому неиспользуемый навык не расходует токены.

  • Меняйте модели прямо в чате

    Навык состоит из инструкций, а не кода, поэтому смена модели не нарушает его работу: новая модель читает тот же файл SKILL.md.

Инструкции навыка

Это содержимое файла SKILL.md, которое загружает модель. Прочитайте его перед установкой: навык — это инструкции, которым будет следовать ваша модель.

Trading Discipline

Most retail losses come from behaviour, not analysis: the oversized trade, the revenge trade after a loss, the fifth trade on a red day. This skill turns the rules into checks that run before money moves, and turns the journal into feedback afterwards.

Commands

bash
# Can I trade today? (status GREEN / AMBER / RED + allowed risk for the next trade)
python3 scripts/discipline.py breaker trades.csv --capital 500000 [--as-of 2026-10-29]
# Pre-trade gate (writes nothing). Add --journal to fold in the breaker.
python3 scripts/discipline.py gate --capital 500000 --entry 1450 --stop 1410 --target 1550 --qty 120 \
    --plan-written yes --minutes-since-last-loss 90 --regime risk-on --fno-ban no --asm-gsm no \
    --event no --circuit-locked no --journal trades.csv
python3 scripts/discipline.py gate --segment options-buy --entry 140 --stop 85 --qty 75 --expiry-day yes ...
# Coaching review, and the latest ISO-week digest (or --week 2026-W43)
python3 scripts/discipline.py review trades.csv [--recent 10]
python3 scripts/discipline.py review trades.csv --week
# Only when the user asks to keep a record: run the gate and append one row to a CSV log
python3 scripts/discipline.py log --log decisions.csv --symbol INFY --action taken <gate flags>

Every command takes --json. Dates are IST; --as-of defaults to today in IST. Bad input prints error: ... and exits 2.

Journal: the same CSV as ../position-sizing/scripts/risk.py journal (date,symbol,side,entry,exit,stop,qty,charges, or a pnl column), plus optional exit_date, time (HH:MM entry time), setup (or tag), mistake (several separated by ;), segment (equity / fno / intraday) and notes. A row with a blank exit and blank pnl is an open trade: it is left out of realised statistics and listed separately, and its stop risk counts against the breaker's remaining room. A zero-P&L trade is a breakeven, not a loss.

Circuit breaker: rules and why

Rule (default, flag)TripsReleasesWhy
Daily loss 2% (--daily-pct)REDNext weekdayTwo full 1% losses; after that, decisions get worse
Weekly loss 5% (--weekly-pct, Mon–Sun)REDNext MondayStops a bad day turning into a bad month
Monthly loss 10% (--monthly-pct)RED1st of next monthRecovering 10% needs 11%; recovering 30% needs 43%
3 losses in a row, latest today (--stop-streak)REDNext weekdayTilt: the next trade is usually the worst one
3+ streak still open from an earlier dayAMBERA winFirst trade back should be your best setup
5 losses in a row (--reduce-streak)AMBER, size ×0.5After 5 more trades (--reduce-trades)Shrink until the edge reappears
Any period ≥ 50% of its limitAMBER—Early warning

Limits use net realised P&L for the IST day, ISO week and calendar month. Breakevens neither extend nor break a streak. Allowed risk for the next trade = normal risk (--risk-pct, 1%) × the size multiplier, capped so that a stop-out (plus stop risk on open trades) cannot breach any limit. Holidays are not modelled; "next weekday" may be an NSE holiday (see indian-market-structure).

Pre-trade gate

Any BLOCK → BLOCK; otherwise any WARN → PASS-WITH-WARNINGS; else PASS. Unsupplied yes/no flags are skipped, except where noted.

CheckBLOCK whenWARN when
Stop-lossMissing, or on the wrong sideOption buy with no premium stop (full premium = risk)
Rupee riskUnknown (no qty/capital), or > --risk-pct-limit (1%)—
TargetWrong side, or R:R < 1Missing, or R:R < 1.5
Written plan--plan-written noNot stated
Revenge window< 30 min since last loss (--revenge-minutes)Not stated but today's last journal trade was a loss
Regime (label from market-regime)crash / panic / no-trade, for longsTrading against risk-off or risk-on; sideways / volatile; unknown label
F&O banFresh F&O position in a ban-period stockCash trade in a ban stock; F&O with ban status unknown
ASM / GSM / T2T (--asm-gsm)Intraday (T2T/GSM can't be squared off)Delivery
Results / board meeting in window (--event)—Gap risk; IV crush for options
Circuit-locked (--circuit-locked)Always—
Expiry day (Tue NIFTY, Thu SENSEX)—Option buy on expiry; option sell (extra ELM). Auto-flagged on Tue/Thu if not stated
MIS cut-off (--segment intraday, --time)At or after 15:00 IST (auto square-off ~15:15–15:20)Before 09:15
Circuit breaker (--journal)RED, or trade risk > breaker's allowed riskAMBER

--segment is equity, intraday, futures, options-buy or options-sell. --qty is the total quantity (lots × lot size). Add --charges (₹) from trading-costs to include costs in the risk.

How other skills use the gate

  • india-market-analyst: when a trade idea reaches a concrete entry/stop/target, run the gate and show its verdict with the plan. Fetch ban list, ASM/GSM status and results dates first where a data source allows; otherwise ask the user rather than assuming "no".
  • broker-integration: the gate runs before step 3 of the order protocol (the ticket). BLOCK → do not draft a ticket; explain the blocks. PASS-WITH-WARNINGS → list each warning on the ticket and still wait for an explicit "yes". PASS → the normal ticket and confirmation still apply. The gate never places, modifies or cancels orders.
  • Logging is opt-in: use log only when the user asks to keep a decision record. It appends one row and refuses a file whose header is not a decision log.

Not the same as position-sizing

position-sizing answers how many shares for a given risk. This skill answers whether to trade at all, and how much risk is allowed right now, given today's losses, streaks and the checklist. Use the breaker's allowed risk as the --risk-pct input to risk.py size, then gate the result.

Review and weekly digest

review reports win rate, average win/loss, profit factor, expectancy (₹ and R), max drawdown and longest losing streak, then breaks results down by setup, entry weekday, entry hour, segment, F&O vs cash, mistakes ranked by ₹ lost, clean vs mistake trades, winner vs loser holding days (needs exit_date), and the last N trades vs the N before. Coach notes name the best and worst setup, the costliest mistake and any trend. --week summarises one ISO week: trades closed, best and worst, mistakes, setup mix and the previous week's net.

F&O context: SEBI's FY25 study found about 91% of individual F&O traders lost money; the FY26 update (press release 50/2026) put it near 88%. If a user's own F&O rows are net negative while cash trades are positive, say so plainly and suggest pausing F&O until the cash edge is proven.

Output

Circuit breaker: AMBER (as of Tue 27 Oct 2026 IST, capital ₹5,00,000)
Allowed risk on next trade: ₹2,500 (0.50%) • After a 5+ loss streak, risk is cut to 50% for 3 more trades
Pre-trade gate: BLOCK  [BLOCK] revenge-window  Only 10 min since the last loss ...

Limits: every India flag is supplied by the user or a data tool, so the gate is only as good as those answers. Regime labels are matched by keyword. Fewer than 30 trades make review numbers noisy.

Educational discipline tool, not investment advice. The rules are defaults; the decision stays yours.

Файлы в комплекте

Модель читает эти файлы по мере необходимости, пока навык загружен. Они доступны только для чтения и никогда не выполняются.

Часто задаваемые вопросы

Что делает навык ИИ Trading Discipline?

Rules that protect an Indian trader from themselves: an account-level circuit breaker (daily 2%, weekly 5%, monthly 10% loss limits plus losing-streak cooldowns) read from the trade journal, a pre-trade gate (stop, rupee risk, R:R, written plan, revenge window, regime, F&O ban, ASM/GSM/T2T, results, circuit lock, expiry day, MIS cut-off) that returns PASS / PASS-WITH-WARNINGS / BLOCK before any order ticket, a performance review by setup, weekday, hour, segment and mistake, a weekly digest, and an opt-in decision log. discipline.py, stdlib only, offline. Use when the user asks: "should I ta...

Зачем использовать Trading Discipline в TypingMind?

Потому что вы устанавливаете навык один раз и используете его с любой моделью. Trading Discipline — это обычный текст в формате Markdown, а не код для конкретного поставщика, поэтому один и тот же навык работает с GPT-5, Claude, Gemini, Grok или локальной моделью. Вы можете менять модель прямо во время чата, и навык продолжит работать. TypingMind использует ваши собственные ключи API, поэтому вы платите поставщикам напрямую, а не оформляете подписку с оплатой за каждое место. Ваши навыки и чаты остаются в вашем собственном хранилище.

Как установить Trading Discipline в TypingMind?

В TypingMind откройте «Плагины → Навыки → Установить из GitHub» и вставьте https://github.com/Shubhamkumartrichy/claude-trading-skills-india/tree/main/skills/trading-discipline. TypingMind прочитает файл SKILL.md, включит сопутствующие файлы в пакет и установит навык, который можно включать отдельно для каждого чата.

Какие модели ИИ могут использовать Trading Discipline?

Любая модель, которую вы подключите в TypingMind. Навыки ИИ — это обычные инструкции в формате Markdown, а не код для конкретного поставщика, поэтому GPT, Claude, Gemini, Grok и локальные модели могут загружать этот навык, когда запрос ему соответствует.

Со сколькими моделями ИИ можно использовать Trading Discipline?

С любым количеством. В TypingMind вы можете использовать Trading Discipline с любой моделью, которая поддерживает навыки, в том числе с GPT, Claude, Gemini, Grok, DeepSeek, Mistral и Llama. Для этого вы используете собственные ключи API.

Бесплатен ли навык ИИ Trading Discipline?

Да. Навык опубликован на GitHub по лицензии MIT. Издатель — Shubhamkumartrichy. Вы платите только своему поставщику ИИ за использованные токены.

Что такое навыки ИИ?

Навык ИИ — это набор инструкций, которыми модель ИИ может пользоваться каждый раз, когда ей нужно выполнить конкретную задачу. Он соответствует открытому формату Agent Skills: файл SKILL.md с названием и описанием, а также любые скрипты, шаблоны или справочные файлы, которые могут понадобиться модели. Модель читает инструкции, только когда ваш запрос соответствует навыку, поэтому установленный навык ничего не стоит, пока не используется.

Чем навыки ИИ отличаются от плагинов и серверов MCP?

Плагин или сервер MCP даёт модели новые инструменты, которые она может вызывать: при вызове где-то выполняется код и возвращает результат. Навык ИИ, напротив, даёт модели знания и описывает порядок действий: как подойти к задаче, какие шаги выполнить и каким должен быть хороший результат. Навыки — это обычный текст в формате Markdown, поэтому им не нужны сервер, ключ API или среда выполнения, и они работают с любой моделью.

Все

Создайте своё рабочее пространство с ИИ прямо сейчас

Подпишитесь на нашу рассылку, чтобы узнавать о новых функциях и предстоящих розыгрышах 👇