Community scripts built for Indian markets. Add any of them to your chart in one click.
Trending Scripts
SuperTrend Strategy
A simple trend-following strategy built on the SuperTrend line. It goes long when SuperTrend flips up and short when it flips down, and each flip also closes the opposite trade. Works best on trending markets and daily or hourly charts.
How to use: add it to a chart and open Backtest. Inputs are the ATR length (10) and multiplier (3.0), a switch to allow or block shorts, and an optional intraday square-off time for intraday testing. The green and red lines on the chart show the current trend.
Backtest note: on RELIANCE daily it returned +2.73% over 139 trades (profit factor 1.04, max drawdown 14.5%) with 0.03% commission and 1 tick slippage. Trend systems give back some profit in sideways markets, and past results do not guarantee future returns, so test it on your own symbols.
A trend-following strategy built on an OTT-style trend line: a CMO-weighted moving average with a percent trailing line around it. It goes long when the moving average crosses above the trend line and short when it crosses below, and each flip closes the opposite trade.
How to use: add it to a chart and open Backtest. Inputs are the moving average length (2), the trailing percent (1.4), a switch to allow or block shorts, and an optional intraday square-off time for intraday testing. A smaller percent reacts faster but flips more often, and a larger one filters noise but enters later.
This is an OTT-style build from the published formula, so check it on your own symbols and timeframes before relying on it. Past results do not guarantee future returns.
A long-only dip-buying strategy. It waits for a fear spike (Williams Vix Fix), then buys when StochRSI turns up from oversold. Best suited to daily charts of liquid stocks and indexes.
How to use: add it to a chart and open Backtest. Inputs cover the Vix Fix look-back, the StochRSI settings, an exit when RSI is above 65, a 20-bar time stop and a 2.5 x ATR stop. Turn on Intraday square-off if you test it on intraday charts.
Backtest note: on RELIANCE daily it returned +3.51% over 150 trades (profit factor 1.09, max drawdown 9.2%) with 0.03% commission and 1 tick slippage. Past results do not guarantee future returns, so test it on your own symbols.
zigzag(len) returns alternating swing highs and lows. It extends the latest swing when a more extreme pivot of the same type appears, and flags new and extended swings so users can draw lines.
marketStructure(len) returns a trend state of 1, -1 or 0, the last two swing highs and lows, and break-of-structure flags.
fibLevel(start, end, ratio) returns a retracement price.
swingRangePct(start, end) returns the size of a swing in percent.