TradingCharts

What it does

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.

How to use it

  • Open the charts and go to Indicators › My scripts › Shared with me (or search the Community library) and press Add to chart.
  • Open it in the ChartScript Editor to read the code; Create a copy makes your own editable version.

Version history

  • v1 — 24 Nov, 08:10 am · compiler 0.3.69

#supertrend#atr#trend-following#swing#long-short