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.
npx skills add Bhala-Srinivash/nse-trading-skills --skill trailing-stopsgit clone --depth 1 https://github.com/Bhala-Srinivash/nse-trading-skillsWrote 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.
[](https://agentmods.dev/skills/bhala-srinivash/nse-trading-skills/trailing-stops)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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
- Entry price and current price: Known or from
get_quotes_and_depth - ATR(14):
get_historical_technical_indicatorsfrom Groww, or user-provided - Recent swing lows/highs:
fetch_historical_candle_data(daily) - Moving averages: SMA20, EMA50 from indicators
- Initial risk (1R): Entry - original stop-loss
The Hybrid Approach (Recommended)
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.
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.
- 12d ago First seen · 91 lines · 103 tokens per session scan A 052d7231db2d
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.
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.
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.
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.
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.
ib-collar
Generate tactical collar strategy reports for protecting PMCC positions through earnings or high-risk events. Requires TWS or IB Gateway running locally.
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.