Strategy · Pine Script v6 · On the chart

PF MTF probe 07 - triple TF close

by pineforge-4pass· code credited to PineForge contributors 2026

This strategy analyzes closing prices from three simultaneous multi-timeframe security feeds: 60-minute, 240-minute, and daily.

View on GitHub

GitHub stars1on the repository
Pine versionv6current
Lines of code39
Settings0inputs
LicenceApache-2.0
Last update5 days ago23 Oct 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above, or the copy button on the code below.
  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

39 lines of Pine Script v6 from validation/mtf-triple-tf-close-confluence-01/strategy.pine, published under Apache-2.0. Keep the author's credit and licence lines when you reuse it.

strategy.pine
// This Pine Script® code is licensed under Apache-2.0
// SPDX-License-Identifier: Apache-2.0
// © PineForge contributors 2026
//
// MTF probe 07 — triple HTF close confluence (60m + 240m + D)
//
// Purpose: isolate alignment of THREE simultaneous request.security feeds.
// Existing MTF probes cover one HTF feed (03/04/05/06) or a single dual-TF
// pair (02). The IES integration probe family queries three different HTFs
// at once and produced ~2x trades vs TradingView; this probe escalates to
// three TFs with the
// simplest possible expression (`close`) so any divergence here points to
// the multi-feed layout itself rather than to a derived TA expression.
//
// TV setup: 15m chart, same symbol/window as data/ohlcv_ETH-USDT-USDT_15m.csv.
// Export TradingView "List of trades" to trades.csv in this folder.
//@version=6
strategy("PF MTF probe 07 - triple TF close", shorttitle="MTF_p07_3TF", overlay=true,
     initial_capital=1000000,
     commission_type=strategy.commission.percent, commission_value=0, slippage=0,
     default_qty_type=strategy.fixed, default_qty_value=1, pyramiding=1,
     process_orders_on_close=false)

float h60  = request.security(syminfo.tickerid, "60",  close, lookahead=barmerge.lookahead_off)
float h240 = request.security(syminfo.tickerid, "240", close, lookahead=barmerge.lookahead_off)
float hD   = request.security(syminfo.tickerid, "D",   close, lookahead=barmerge.lookahead_off)

bool allUp   = h60 > h60[1] and h240 > h240[1] and hD > hD[1]
bool allDown = h60 < h60[1] and h240 < h240[1] and hD < hD[1]

if allUp and strategy.position_size <= 0
    if strategy.position_size < 0
        strategy.close("S", comment="flip to long")
    strategy.entry("L", strategy.long, comment="3-TF close up")

if allDown and strategy.position_size >= 0
    if strategy.position_size > 0
        strategy.close("L", comment="flip to short")
    strategy.entry("S", strategy.short, comment="3-TF close down")

Overview

PF MTF probe 07 - triple TF close identifies confluence when all three closes are rising (allUp) or falling (allDown) from the prior bar. When allUp and no long position exists, it enters a long trade, closing any short position first. When allDown and no short position exists, it enters a short trade, closing any long position first. The strategy draws entry and exit signals directly on the price chart as an overlay. No custom inputs are defined and no stop loss or take profit is applied. It uses request.security with lookahead disabled to avoid repainting. The primary controls are pyramiding (set to 1) and fixed position sizing.

Details

Published by

pineforge-4pass on GitHub

Code credit

PineForge contributors 2026, as written in the script's header

Type

Strategy, Pine Script v6

Draws

On the price chart

Category

Trend, SMC / ICT / price action

Markets

Any symbol

Timeframes

M15-H1, H4 and above

Risk Notes

  • The strategy enters trades without a stop loss

Topics

algorithmic-tradingbacktestingparitypine-scriptpinescriptquantitative-financetest-corpustradingview

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

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

FilledValueGap A006

by ruckard
13 stars

This strategy enters trades in the opposite direction of filled value gaps, operating under the assumption that price action will resume the primary trend after filling a recent gap. It plots directly on the main price chart and supports MA-based trend filters

Strategy v5 SMC / ICT / price actionTrend
Updated 1 year ago · None stated GitHub repository of FilledValueGap A006
12 stars

This strategy is titled for Bitcoin on the four-hour chart and is set to draw on the price chart. It detects three-candle fair value gaps and inverted gaps, and it defines a check for price near a gap midpoint within a percentage tolerance. An optional filter

Strategy v6 SMC / ICT / price actionTrend
Updated 4 months ago · None stated GitHub repository of BTC 4h FVG/iFVG Automated Strategy

More strategys

Trade Your Charts With a Regulated Broker

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

Compare brokers