trailing-stops — скилл для Claude Code: что делает и как установить
Скилл trailing-stops для Claude Code помогает выбрать и рассчитать трейлинг-стоп для позиции на NSE/BSE. Он включается, когда нужно защитить прибыль или решить, когда переносить стоп.
MIT ★ 69 обновлён 2026-11-13
/plugin marketplace add Shubhamkumartrichy/claude-trading-skills-india
/plugin install india-trading-skills@india-trading-skillsЧто делает trailing-stops
Скилл рассчитывает уровни трейлинг-стопа и предлагает новый стоп, который не опускается ниже текущего. Основная схема привязывает решение к прибыли в R: до 1R сохраняется исходный стоп, на 1R он переносится к безубытку, на 2R включается ATR-трейл, а на 3R — стоп по структуре. Также описаны трейлы по скользящим средним и метод Chandelier.
Скрипт risk.py trail выводит пройденный уровень, варианты стопа и рекомендованное значение. Для расчёта нужны Python 3 и параметры позиции; ATR, SMA20 или EMA50 и последний минимум колебания берутся из ta.py summary. Для индийских брокеров скилл объясняет ежедневное обновление стопа после закрытия рынка, работу с GTT и SL-ордерами. Значения GTT и SL относятся к правилам исполнения на рынке Индии.
Какие задачи решает
- рассчитать новый стоп с учётом прибыли в R и ATR
- перенести стоп к безубытку после достижения 1R
- выбрать между ATR-трейлом и стопом по структуре
- обновить GTT или повторно выставить дневной SL
Примеры запросов агенту
- Рассчитай, куда перенести стоп по моей позиции на NSE: вход 750, стоп 720, максимум закрытия 845.
- Когда переносить стоп этой сделки к безубытку?
- Сравни ATR-трейл и трейл по структуре для позиции на BSE.
Как установить trailing-stops
1Через маркетплейс плагинов
/plugin marketplace add Shubhamkumartrichy/claude-trading-skills-india/plugin install india-trading-skills@india-trading-skillsКоманда ставит плагин india-trading-skills целиком, со всеми его скиллами
2Через Skills CLI (Vercel)
npx skills add Shubhamkumartrichy/claude-trading-skills-india --skill trailing-stops -a claude-code3Вручную: положить файлы
~/.claude/skills/trailing-stops/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/trailing-stops/
1Через Skills CLI (Vercel)
npx skills add Shubhamkumartrichy/claude-trading-skills-india --skill trailing-stops -a codex2Вручную: положить файлы
.agents/skills/trailing-stops/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add Shubhamkumartrichy/claude-trading-skills-india --skill trailing-stops -a cursor2Вручную: положить файлы
.cursor/skills/trailing-stops/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install Shubhamkumartrichy/claude-trading-skills-india skills/trailing-stops2Вручную: положить файлы
.github/skills/trailing-stops/SKILL.md1Через Skills CLI (Vercel)
npx skills add Shubhamkumartrichy/claude-trading-skills-india --skill trailing-stops -a gemini-cli2Командой платформы
gemini skills install https://github.com/Shubhamkumartrichy/claude-trading-skills-india --path skills/trailing-stopsВручную: положить файлы
.devin/skills/trailing-stops/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Claude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о trailing-stops
Как установить trailing-stops в Claude Code?
Добавь маркетплейс командой /plugin marketplace add Shubhamkumartrichy/claude-trading-skills-india, затем установи скилл командой /plugin install india-trading-skills@india-trading-skills.
Что делает trailing-stops?
Он рассчитывает уровни трейлинг-стопа для позиций на NSE/BSE. Скилл описывает схему по R-мультипликаторам, ATR, структуре цены, скользящим средним и Chandelier.
Что нужно для работы trailing-stops?
Для расчёта через risk.py trail нужен Python 3 и параметры сделки. Данные ATR, SMA20 или EMA50 и последний минимум колебания можно получить через ta.py summary.
Исходный текст
SKILL.md · MIT
---
name: trailing-stops
description: |
Trailing-stop plans that lock in profit on NSE/BSE positions: the R-multiple ladder (hold → breakeven
at 1R → ATR trail at 2R → structure trail at 3R+), plus ATR, structure, moving-average and
chandelier trails, with GTT/SL execution realities for Indian brokers. risk.py trail computes
the recommended ratcheted stop.
Use when the user asks: "how should I trail my stop", "lock in profits on X", "when to move stop to
breakeven", "chandelier exit", "protect my gains", "my stock is up 15%, what now", or anything about
adjusting stops as a trade moves in their favour.
---
# Trailing Stops
Trail to protect open profit while giving the trend room. The stop only moves in the trade's favour.
## Calculator
```bash
python3 ../position-sizing/scripts/risk.py trail --entry 750 --stop 720 --highest-close 845 \
--atr 14 --swing-low 805 --highest-high 850 --sma20 812 --current-stop 760
```
It reports R gained, the ladder stage, every candidate level, and the recommended stop (never below
`--current-stop`). Get ATR, SMA20/EMA50 and the latest swing low from `ta.py summary`.
## The R-multiple ladder (default)
1R = entry − initial stop.
| Stage | Open profit | Stop rule | Why |
|---|---|---|---|
| Fresh | 0 – 1R | Keep the initial stop | Trailing early gets shaken out by noise |
| Early | ≥ 1R | Move to breakeven (entry; add costs for true breakeven) | The trade can no longer lose money |
| Building | ≥ 2R | Highest close − 1.5 × ATR(14) | Gives room while banking most of the move |
| Runner | ≥ 3R | Below the latest higher low (structure) | Follows the trend's own rhythm |
Take the **highest** qualifying level (the tightest) and never lower it.
## Individual methods
| Method | Rule | Best for |
|---|---|---|
| ATR trail | Highest close − k × ATR (k 1.5 tight / 2 standard / 3 loose) | Trending but volatile stocks |
| Structure | Below each new higher low | Clean stair-step trends |
| MA trail | Daily close below SMA20 (fast) / EMA50 (steady) / SMA200 (positional) → exit | Smooth grinders |
| Chandelier | Highest high − 3 × ATR | Explosive runners, momentum names |
| Partial + trail | Book 30–50% at 2R or the 127.2% Fib, trail the rest | Results-season or event-heavy names |
## Execution in India
- **Update daily after the close** using the official close (30-min VWAP), not intraday wicks.
Modify the **GTT** for delivery holdings, or re-place the SL each morning because SL orders expire daily.
- For F&O positions, trail on the underlying or futures chart and execute with SL-limit orders.
Brokers' old bracket/cover orders with trailing are largely discontinued.
- Before **results, Budget or RBI policy days**, tighten to the 1.5 × ATR level or book partial
profits. A gap can jump past any trail.
- **Tax-aware trailing:** if a delivery position is a few weeks from turning long-term (over 12
months), a slightly looser trail may be worth it because the tax rate drops from 20% to 12.5%.
Quantify it with `indian-tax-for-traders`.
## Rules
1. A ratchet: up only (longs), down only (shorts).
2. Evaluate on daily closes; exit in the closing session or at the next open when breached.
3. Don't overtighten: a trail closer than about 1 ATR gets hit by ordinary pullbacks.
4. Choose the method before the trade and stick to it.
## Output
```
Gained: x.xR → stage: [..]
Candidates: breakeven ₹.. | ATR(1.5x) ₹.. | structure ₹.. | chandelier ₹.. | SMA20 ₹..
New stop: ₹S (locks +y.yR) → update GTT trigger ₹S / limit ₹S−b
Next review: after today's close; event risk: [results on dd-mmm]
```
© Shubham Kumar · MIT · Shubhamkumartrichy/claude-trading-skills-india