Strategy · Pine Script v6 · On the chart

MTF Confluence Strategy

by aretephi

MTF Confluence Strategy is a Pine Script strategy that generates long and short signals based on Supertrend flips on the chart timeframe confirmed by Supertrend on a higher timeframe.

View on GitHub

GitHub stars1on the repository
Pine versionv6current
Lines of code78
Settings14inputs
LicenceNone stated
Last update3 months ago25 Jul 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 require ADX above a threshold for trending conditions and optional volume expansion. Position size is calculated from risk percentage divided by ATR-based stop distance, capped at a percentage of equity. An ATR-based stop loss and optional target are set on entries. Trades close if the higher timeframe direction reverses. Supertrend line is plotted on the chart for trend visualization. Settings allow customization of ATR parameters, higher timeframe, filter requirements, risk levels, and session restrictions.

Details

Published by

aretephi on GitHub

Draws

On the price chart

Markets

Any symbol

Timeframes

Any timeframe

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Topics

algorithmic-trading-dotnetbacktestingmetatrader5mql5pine-scripttrading-bottradingview-ideas

Settings

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

SettingTypeDefaultVariable
ATR lengthint10atrLen
ATR multfloat2.0atrMult
HTF confirmationtimeframe240htf
Require ADX trendbooltrueuseAdx
ADX lengthint14adxLen
ADX minfloat22adxMin
Require volume expansionboolfalseuseVol
Volume SMA lengthint20volLen
Risk per trade %float1.0riskPct
Stop ATR xfloat2.0slMult
Target ATR xfloat0.0tpMult
Max position % of equityfloat90maxExpo
Show all 14 settings
SettingTypeDefaultVariable
Restrict hoursboolfalseuseSess
Sessionsession0800-2000sess
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

106 stars

This strategy enters long positions during a specified trading session when multiple technical indicators align. It executes a buy order when the low drops below the lower Bollinger Band while RSI and ADX exceed configurable threshold values, price closes abov

Strategy v4 Volatility & bandsOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of Bollinger Band + RSI + ADX + MACD

Momentum Rider DAILY FINAL

by greenpeas007
58 stars

This strategy combines exponential moving averages (EMA 9, 21, 50), RSI, MACD, and Supertrend indicators to enter long positions. It triggers trades using six dynamic setups based on momentum breakouts, EMA crossovers, and pullbacks. Position sizing is compute

Strategy v6 TrendOscillators & momentum Repaints
Updated 4 months ago · Custom licence GitHub repository of Momentum Rider DAILY FINAL
57 stars

This strategy identifies trend reversals through market structure changes (CHoCH) filtered by MACD momentum. It initiates long positions on bullish structure breaks when MACD is positive and above its signal line, and short positions on bearish breaks when MAC

Strategy v6 SMC / ICT / price actionOscillators & momentum Repaints
Updated 1 year ago · Apache-2.0 GitHub repository of Market Structure MACD 4H + Trailing
53 stars

This strategy enters long or short on the price chart when price is on the correct side of a 200-period EMA, MACD agrees, RSI is not at the opposing extreme, ADX exceeds a threshold, volume beats a 20-bar average, and close breaks the recent high or low. A tim

Strategy v6 TrendOscillators & momentum
Updated 2 months ago · MPL-2.0 GitHub repository of BTCUSD 5M Optimized Strategy

More Trend 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