RN TradeLab
Everything the app can do, before you download it. This is the same guide built into the app (Help → User Guide).
A trading research app with one purpose: **prove your strategy works on
data it has never seen, before you risk money on it.**
Educational tool only. Not investment advice. No performance guarantees.
The app never places orders.
Everything you own - **config.json, your strategies, downloaded data,
saved portfolios, your account and licence** - is kept in one stable
folder:
Documents\RN TradeLab\
Use Help -> Open My Data Folder to jump straight there. Because this
folder is separate from the program itself, you can run RN_TradeLab.exe
from anywhere and it always finds your work.
That's all. Your settings, strategies, data, portfolios and licence are
picked up automatically - nothing to copy, nothing to re-activate. (If
you are updating from a very old build that kept files beside the exe,
they are moved into the folder above automatically on first run.)
Install Python 3.11+ (tick "Add to PATH"), copy the project folder,
pip install -r requirements.txt, then python main.py.
In Tab 1 set Data source to *Yahoo Finance (free)* and click
Download. You get the rolling last ~60 days of 5-minute candles for
your whole universe - real NSE prices, no broker, no signup. Two
things to know: quotes are DELAYED (research only - Live Signals and
the sector heatmap still need Upstox), and the window rolls, so
update regularly: the app merges each download into your local
history, which keeps growing beyond 60 days. Skip 60+ days and that
gap is gone for good.
http://localhost).Tab 1 - Download Data
constituents and extends sectors.csv (run after each rebalance).
(incremental: only new candles are fetched).
Tab 2 - Strategies
logic, click Add Strategy - it is validated (syntax, structure,
a smoke-test run) and instantly appears in the dropdowns.
re-validates. Broken files are listed as LOAD ERROR and kept out of
the dropdowns until fixed.
timestamps must be real candles; never use future rows.
Tab 3 - Backtest
SL or target), Capital, Dataset (universe, custom dataset, or
Sample Data) and Timeframe (5/10/15/30/60 min or Daily).
time window, minimum ATR%. Evaluated on the previous candle
(no lookahead).
once breached, no new entries in that stock for the period.
See Trades on Chart for a candlestick view of every trade: entry
and exit joined by a dotted line (green = winner, red = loser), faint
dashed stoploss and target levels, and a tinted background showing
where out-of-sample data begins. Navigate with the slider, jump
straight from one trade to the next, zoom with + / - or the mouse
wheel, and press Fit Trade to fill the screen with a single trade
so you can see exactly how it played out.
Click any column header to sort. Click a curve thumbnail for the full
equity chart (black = in-sample, blue = out-of-sample) and the
trade-by-trade list with quantities and rupee P&L.
universe by price (from local data) and by any numeric column you add
to fundamentals.csv (e.g. exported from screener.in).
Tab 4 - Optimize
a dataset and timeframe. Set each parameter's Start / Stop / Increment.
will take; a cap prevents runaway runs (reduce your ranges if warned).
row per parameter combination, ranked by in-sample Sharpe. The
out-of-sample (OS) columns beside each row are the honest reality
check - a row that is strong in-sample but weak out-of-sample is
overfit. Pick a combination that holds up in BOTH, then set those
values in your strategy and use the Backtest tab as usual.
Tab 5 - Portfolio
sector, or Suggest Portfolio** - a correlation-aware optimizer
that maximizes the combined in-sample Sharpe (out-of-sample is never
touched during selection; it remains the judge).
Sharpe, drawdown, rupee P&L and the equity curve under a realistic
capital model (capital split equally across stocks; idle when a stock
has no trade).
Tab 6 - Live Signals
Now**. The strategy, timeframe and filters are LOCKED to what that
portfolio was built and validated with - you cannot accidentally
scan an untested configuration. Trade the alerts manually in your
broker app.
stored history so indicators compute exactly as in the backtest.
Tab 7 - Performance
compares your live results to the backtest - the whole point of the
manual-trading phase.
Tab 7 - Knowledge Base
sessions converted to IST (daylight-saving handled automatically),
last price and day change.
click a sector to drill into its stocks.
Every strategy below is a plain .py file in your strategies folder -
open any of them in Tab 2 to read the code and comments. All are long
only, and all expose tunable inputs in the Optimize tab.
Indicator based
| Strategy | Idea |
|---|---|
| EMA Crossover | fast EMA crosses above slow EMA |
| MACD Crossover | MACD line crosses above its signal line |
| RSI Reversal | RSI climbs back up through oversold (buys the bounce) |
| Bollinger Breakout | close pushes above the upper band |
| Bollinger Mean-Reversion | close reclaims the lower band, target = middle band |
| Stochastic Crossover | %K crosses %D while oversold |
Price structure (no indicators)
| Strategy | Idea |
|---|---|
| Recent-High Breakout | breaks the highest high of the last N candles |
| Support Bounce | dips to recent support and closes back above it |
| Inside Bar Breakout | breaks out of a coiled inside-bar pattern |
| Gap-Up Continuation | opens well above yesterday's close |
| Gap-Down Fill | opens well below, targeting the gap fill |
| ORB Breakout | breaks the opening range of the day |
Combinations (a filter plus a trigger)
| Strategy | Idea |
|---|---|
| EMA Trend + RSI Pullback | buy dips only while the trend is up |
| MACD + Volume Confirm | crossover only if volume beats its average |
| VWAP Bounce | intraday dip to VWAP that holds, on an up day |
Tips: compare Bollinger Breakout against Bollinger Mean-Reversion
on the same stocks - the same indicator, opposite ideas, and only the
out-of-sample column tells you which your market rewards. Gap strategies
need real market data (sample data has no overnight gaps).
curve-fitting - the app is designed to show you exactly that.
what to trade forward, but it flatters historical results slightly
(survivorship-style bias). Don't read filtered backtests as "what I
would have earned".
whether reality matches the backtest before risking capital.
| File | Purpose |
|---|---|
| config.json | API keys, token, capital, filter/risk settings |
| stocks.csv | current download universe |
| nifty50/100/200.txt | universe lists (refresh from NSE in-app) |
| sectors.csv | symbol-to-sector mapping (editable) |
| fundamentals.csv | your fundamental data for dataset filters |
| strategies/*.py | one file per strategy |
| data/*_5min.parquet | downloaded / sample candles |
| data/portfolios/*.json | saved portfolios (with settings stamp) |
| data/datasets/*.json | saved custom datasets |
| data/trade_journal.csv | your live trade log (opens in Excel) |
| data/users.db | local accounts (trial/license, machine binding) |
*Start small. Validate honestly. Let the data say no.*
Tab 8 - Knowledge Base
breadth snapshot (advancing vs declining).
close, whether that gap is HOLDING or FADING since the open, and how
today's volume compares with the stock's own 20-day average. This is
the live view of what the Gap-Up Continuation and Gap-Down Fill
strategies backtest.
drill into its stocks.
of how RN TradeLab uses them.
The live panels refresh every 60 seconds during market hours and need an
Upstox connection (Yahoo's free data is delayed, so it powers research
rather than live views).
Top Gainers/Losers, Gap & Momentum and the Sector Heatmap each have a
Universe dropdown - All, Nifty 50/100/200, or any custom dataset
you've created - so you can narrow live movers to the stocks you
actually care about instead of your whole downloaded universe.