trailing-stops

trailing-stops is a skill for Claude Code, Codex from Bhala-Srinivash/nse-trading-skills. It costs 103 tokens per session (914 once invoked), scanned A, original, MIT.

A guide to trailing stops for shares traded on India's NSE and BSE exchanges. A trailing stop is an exit price that moves with a profitable trade to help protect gains.

In plain words
What is it for?
Use it to choose ATR-based, price-structure, moving-average, chandelier, or hybrid trailing methods using entry price, current price, volatility, candles, and indicators.
Why use it?
It helps decide when and how to move a stop so normal price noise does not close a trade too early while profits remain protected.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to choose ATR-based, price-structure, moving-average, chandelier, or hybrid trailing methods using entry price, current price, volatility, candles, and indicators.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/bhala-srinivash/nse-trading-skills/trailing-stops
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Bhala-Srinivash/nse-trading-skills --skill trailing-stops
Clone the repo
git clone --depth 1 https://github.com/Bhala-Srinivash/nse-trading-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for trailing-stops

README.md
[![agentmods](https://agentmods.dev/badge/skills/bhala-srinivash/nse-trading-skills/trailing-stops/github.svg)](https://agentmods.dev/skills/bhala-srinivash/nse-trading-skills/trailing-stops)
Your own site
<a href="https://agentmods.dev/skills/bhala-srinivash/nse-trading-skills/trailing-stops"><img src="https://agentmods.dev/badge/skills/bhala-srinivash/nse-trading-skills/trailing-stops/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for trailing-stops

Your own site · 80×15
<a href="https://agentmods.dev/skills/bhala-srinivash/nse-trading-skills/trailing-stops"><img src="https://agentmods.dev/badge/skills/bhala-srinivash/nse-trading-skills/trailing-stops.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 103 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 914 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00103 $0.00914
Opus 5 $0.00051 $0.00457
Sonnet 5 $0.00021 $0.00183
Haiku 4.5 $0.00010 $0.00091

Measured 12d ago against content hash 052d7231db2d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

trailing-stops scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

trailing-stops/SKILL.md · 91 lines

How it starts

The opening of the file, as written. The whole thing — 91 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Trailing Stops

Once a trade is profitable, trailing stops protect your gains while letting winners run.

Prerequisites

No dependencies required. Provide entry, current price, and ATR manually. Enhanced with Groww MCP (live ATR, candles, MAs) or yfinance.

Data Needed

  1. Entry price and current price: Known or from get_quotes_and_depth
  2. ATR(14): get_historical_technical_indicators from Groww, or user-provided
  3. Recent swing lows/highs: fetch_historical_candle_data (daily)
  4. Moving averages: SMA20, EMA50 from indicators
  5. Initial risk (1R): Entry - original stop-loss

This progressive system adapts as the trade matures:

Trade Stage Profit Level Trailing Method
Just entered 0 to 1R Fixed stop — don't trail yet, use initial stop-loss
Early profit 1R gained Move to breakeven — stop at entry price (eliminates risk)
Building profit 2R gained ATR trail — highest close minus ATR(14) × 1.5
Strong runner 3R+ gained Structure trail — below most recent swing low

This works because:

  • Below 1R: Moving stop too early gets you shaken out on noise
  • At 1R: Breakeven means you can't lose money — psychological freedom to hold
  • At 2R: ATR trail gives the stock room to breathe while protecting most profit
  • At 3R+: Structure trail is tighter, appropriate when you have a large cushion

Individual Methods

ATR Trail

Trailing stop = Highest close since entry - ATR(14) × multiplier
Multiplier: 1.5 (tight), 2.0 (standard), 3.0 (loose)

Recalculate daily at market close. Only move stop up, never down.

Structure Trail

Trailing stop = Below the most recent higher low

Identify swing lows on the daily chart. Each new higher low becomes the new stop reference. Best for stocks making clear stair-step patterns.

Moving Average Trail

Aggressive: Trail below SMA20 (for fast trends)
Moderate: Trail below EMA50 (for steady trends)
Conservative: Trail below SMA200 (for long-term holds)

Use closing price vs MA — if daily close is below the MA, exit next day.

Read the full file on GitHub · 91 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 91 lines · 103 tokens per session scan A 052d7231db2d

Subscribe to this mod's changes

trailing-stops is a skill published in the GitHub repository Bhala-Srinivash/nse-trading-skills (38 stars, last pushed 6mo ago), licensed MIT. It adds 103 tokens to every session and 914 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

ib-pmcc-advisor

Analyze PMCC (Poor Man's Covered Call / diagonal spread) positions from IB portfolio. For each diagonal spread, reports short leg risk (delta, IV, assignment probability), daily P&L projections, top-3 roll candidates, and a side-by-side comparison table. Requires TWS or IB Gateway running locally.

staskh/trading_skills · 71 tokens

scanner-pmcc

Scan stocks for Poor Man's Covered Call (PMCC) suitability. Analyzes LEAPS and short call options for delta, liquidity, spread, IV, yield, trend direction, and earnings proximity. Use when user asks about PMCC candidates, diagonal spreads, or LEAPS strategies.

staskh/trading_skills · 63 tokens

ib-stop-loss

Downside stop-loss management for PMCC, naked LEAPS, and stock positions in IB. Computes stop prices, detects alerts, and places conditional combo orders. Dry-run by default. Requires TWS or IB Gateway running locally.

staskh/trading_skills · 50 tokens

ib-trailing-stop

Server-side trailing stop management for stocks and naked LEAPS in IB. Places native TRAIL orders that auto-ratchet the stop as price climbs. Dry-run by default. Requires TWS or IB Gateway running locally.

staskh/trading_skills · 49 tokens

ib-collar

Generate tactical collar strategy reports for protecting PMCC positions through earnings or high-risk events. Requires TWS or IB Gateway running locally.

staskh/trading_skills · 30 tokens

ib-find-short-roll

Find roll options for existing short positions OR find best covered call/put to open against long stock. Use when user asks about rolling shorts, finding roll candidates, writing covered calls, or managing option positions. Requires TWS or IB Gateway running locally.

staskh/trading_skills · 55 tokens