Strategy · Pine Script v6 · On the chart

Contra Pivot SuperTrend Fade

by raybird

A counter-trend strategy that fades price when it reaches a Pivot Point SuperTrend band, selling into upward stretches and buying into downward ones.

View on GitHub

GitHub stars1on the repository
Pine versionv6current
Lines of code274
Settings27inputs
LicenceNone stated
Last update2 months ago15 Aug 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new strategy, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart. The trades and results appear in the Strategy Tester tab; adjust the settings with the gear icon.

Source Code

The code stays on GitHub. The author has not published this script under an open licence, so ForexR does not show its code. Copy script reads the file straight from GitHub into your clipboard, so you can still try it on your own chart. Ask the author before reusing the code anywhere else.

Overview

Signals can fire on a touch of the band, on a regime flip, or both. Optional filters use the opening range of each session, ADX strength, an ATR minimum and a 50 EMA. After the first entry it can add up to 49 further entries in the profit direction at fixed steps, with target, stop and trailing options set in points or percent.

Details

Published by

raybird on GitHub

Draws

On the price chart

Markets

Indices

Timeframes

M15-H1

Risk Notes

  • The strategy can add several entries in the same direction

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
Enable BUY (long fade)booltrueenLong
Enable SELL (short fade)booltrueenShort
Fire signal onstringBothtrigMode
Qty per entry (first + each pyramid)float1.0baseQty
Pivot point periodint2ppPrd
ATR factorfloat3.ppFactor
ATR periodint10ppAtrLen
Use ORB filterbooltrueuseOrb
ORB length (first N candles of session)int3orbBars
DI lengthint14diLen
ADX smoothingint14adxSm
Min ADX to enterfloat20minAdx
Show all 27 settings
SettingTypeDefaultVariable
Use ATR filterboolfalseuseAtr
ATR lengthint14atrLen
ATR must be greater thanfloat10atrThr
Use EMA filterbooltrueuseEma
EMA lengthint50emaLen
Number of pyramids after first entryint2numPyr
Pyramid step typestringPointspyrType
Pyramid step (in unit above)float20pyrVal
Target typestringPointstgtMode
Target valuefloat60tgtVal
SL typestringPointsslMode
SL valuefloat40slVal
Trailing typestringOfftrlMode
Trailing distancefloat30trlVal
Plot ATR (own scale)boolfalseshowAtrP
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.

Similar Pine Scripts

13 stars

This strategy overlays the price chart to trade DAX futures during European market hours. It calculates exponential and simple moving averages, RSI, MACD, Bollinger Bands, ATR, and realized volatility to simulate VIX levels. Trades execute when session time fi

Strategy v5 Sessions & timeOscillators & momentum
Updated 8 months ago · Custom licence GitHub repository of ClaudeHedge - DAX Session Strategy
4 stars

This strategy trades opening gap fades on the DAX index during the European Xetra session. At the 09:00 CET market open, it measures the opening price against the previous close relative to an ATR threshold. If a gap exceeds the threshold, it fades the move by

Strategy v6 Mean reversionSessions & time
Updated 2 months ago · MIT GitHub repository of DAX Gap Fade [trugurpala]
3 stars

This strategy plots Bollinger bands and a simple moving average on the price chart. It opens a short when price crosses above the upper band while below the average, and a long when price crosses below the lower band while above the average. Entries are allowe

Strategy v5 Volatility & bandsMoving averages
Updated 2 years ago · None stated GitHub repository of 周末布林带策略

RSI Mean Reversion

by GifariKemal
3 stars

This strategy plots entry signals, stop loss, take profit levels, and an information panel directly on the price chart. It combines a relative strength index mean reversion model with ATR percentile thresholds to filter trades based on volatility conditions. T

Strategy v5 Oscillators & momentumVolatility & bands
Updated 4 days ago · MIT GitHub repository of RSI Mean Reversion

FTB Strategy

by Web3Degenerate
2 stars

The FTB Strategy is a short-only overlay strategy targeting EURUSD during the European session from 0200-0700. It enters short positions when filters confirm RSI overbought, a bullish prior bar close, or a high price level within lookback bars, combined with a

Strategy v5 Mean reversionSessions & time
Updated 2 years ago · None stated GitHub repository of FTB Strategy
2 stars

This mean-reversion trading strategy targets XAUUSD during the Asian trading session. It generates buy signals when price touches the lower Bollinger Band and RSI is oversold, and sell signals when price reaches the upper band and RSI is overbought. Trades are

Strategy v6 Mean reversionSessions & time
Updated 4 months ago · None stated GitHub repository of XAUUSD Mean Reversion Strategy

More Mean reversion scripts

Related on ForexR

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers