Self-hosted · runs on your own computer

Discipline-first intraday
trading for NSE

Most trading losses come from impulse, not bad predictions — skipped stop-losses, oversized bets, revenge trades. Sanyam (संयम — self-control, restraint) is an execution desk that enforces restraint: every order, manual or automated, passes a risk engine that nobody can bypass.

No signup, no cloud account — it's a desktop app you run yourself.
Paper trading by default Live execution, explicitly confirmed Six months of paper validation recommended

What it actually does

Not a signals service, not a copy-trading bot. A dashboard and a risk engine that sit between you and your broker.

◎

Live dashboard

Watchlist with sparklines, KPI tiles for capital and day P&L, a loss-cap meter, win rate, profit factor, max drawdown, positions and orders blotter, equity curve, activity log. Works on a phone.

⛊

Risk engine

1% risk per trade with an enforced stop-loss, a 3% daily loss cap that locks the day when hit, a gross exposure cap, and a cooling-off lock that blocks all new orders after two rejections in a row.

◈

Discipline score

A 0–100 score and clean-day streak computed from what the risk engine actually blocked — makes "did I follow my own rules today" visible at a glance, instead of buried in a log.

⚙

Automation, same rules

Five strategies, each with an on/off toggle and editable parameters. They only emit trade intents — every one passes through the identical risk engine a manual click would. See the list.

◫

Options & futures

NIFTY/BANKNIFTY option buying with strike, expiry and a separate risk cap, previewed before anything is placed. Index futures and cash equities, paper or live.

⏻

Kill switch

One click blocks all new orders and turns off automation — exits still work. A two-step "flatten all" closes every position and engages it.

The strategies

The patterns Indian intraday traders actually use, written as rules rather than hunches. Every parameter is editable, and every signal goes through the same risk engine as a manual order.

◳

Opening Range Breakout

Marks the high and low of the first 15 minutes, then takes a close beyond either side. One entry per day — the first break of the opening balance is the trade. Range length and breakout buffer are configurable.

◤

Supertrend

ATR bands that flip with trend, long above the line and short below, reversing on each flip. Wilder-smoothed, so it reads the same as the Supertrend on your TradingView or Streak chart.

◍

VWAP trend

Trades the side of the session's volume-weighted average price, the benchmark institutions execute against. Cash equities only — index bars carry no volume, so an index has no VWAP.

⤬

EMA 9/21 + RSI

The classic crossover, but only taken when RSI agrees with the direction. The filter is the point: a bare crossover flips constantly in a range.

◎

Index Momentum

Enters NIFTY/BANKNIFTY when short-term momentum clears a threshold and exits when it fades, with a cooldown to stop it re-entering into chop.

⎌

Backtest before you trust any of them

A replay harness runs a strategy over historical candles through the real risk engine — same code that trades live, not a simulation of it. It reports the biases it doesn't model, including brokerage and taxes, which are material intraday.

Rules nothing can bypass

Enforced in the risk engine, not the UI — a strategy can't sidestep a rule a manual order can't.

1
1% risk per trade
Every position needs a stop-loss. Money at risk — qty × price × stop% — must stay under 1% of capital, and the stop is enforced automatically when price crosses it.
2
3% daily loss cap
Counts realized plus open P&L. Hit the cap and everything is flattened, trading locks until the next day — no override from the UI.
3
Cooling-off lock
Two rejected orders in a row blocks all new orders for 15 minutes. Targets revenge trading directly — exits still work, you can't talk your way out of it.
4
Exposure cap & no naked options
Gross open exposure can't exceed 5× capital. Options can only be sold against ones you already hold long — never naked.

Yours, not a cloud service

The engine, the database and your broker credentials never leave your own computer.

Runs entirely locally

One process on your own machine — open a browser tab to 127.0.0.1. No account to create, no third party holding your data, no server that can be breached because there isn't one.

Your broker, your keys

Connect Zerodha or free Upstox market data with your own API keys, stored in your own .env file. Live order placement is off by default, resets on every restart, and needs a typed confirmation phrase.

Try it yourself

Download, unzip, run one script. Works on your own computer — no account, no install beyond Python.

1
Download and unzip
Get sanyam.zip below and extract it anywhere — your Desktop is fine.
2
Run the start script
Windows: double-click start.bat. Mac/Linux: run bash start.sh. First run takes about a minute to set itself up (needs Python 3.10–3.13); your browser then opens to the dashboard automatically.
3
Try it on simulated prices first
It works immediately with no setup, using simulated prices and fully simulated orders — nothing real is at risk until you deliberately connect a broker.
4
Optional: connect your own broker
Connect your own Zerodha or Upstox login for real NSE prices. Live order placement is a separate, explicit step — off by default, and it resets every time the app restarts. Full walkthrough for both is in SETUP_WINDOWS.md, included in the download.
Not investment advice. Sanyam is a personal, self-hosted trading tool — it is not a broker, is not SEBI-registered, and does not manage money or provide investment advice. You connect your own broker account, and every trade, paper or live, is made at your own risk.

The strategies ship unproven. They are well-known patterns implemented as written, and they are tested to behave as described — not to be profitable. No performance is claimed for any of them, and none has been validated against live market results. That is exactly what the backtest harness is for: run them over real history yourself, with costs in mind, before putting money behind one.