Strategy · Pine Script v6 · On the chart

PF MTF probe 04 — D high[1] break

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

The strategy monitors the lower timeframe close crossing above the previous daily high obtained via request.security on the daily chart.

View on GitHub

GitHub stars1on the repository
Pine versionv6current
Lines of code32
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

32 lines of Pine Script v6 from validation/mtf-daily-prev-high-break-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 04 — Daily high[1] vs 15m close (classic “HTF level” gate)
// Purpose: parity test for `request.security(..., "D", high[1], lookahead_off)`
// — the `[1]` history reference INSIDE the security call must resolve on the
// HTF bar, not the LTF chart bar.
//
// request.security(..., "D", high[1])
//
// Strict TV↔engine parity checklist:
// - Use the same symbol feed as data/ohlcv_ETH-USDT-USDT_15m.csv (Binance USDT-M ETH).
// - Match chart date range to the OHLCV file; TV “List of trades” must cover that window.
// - Set validate_detailed_report / inputs.json: tv_trades_csv_tz = "utc" if chart TZ was UTC
//   when exporting trades, else "utc_plus_8" (default). Mismatch causes ±8h pairing errors.
//@version=6
strategy("PF MTF probe 04 — D high[1] break", shorttitle="MTF_p04", 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 dHigh1 = request.security(syminfo.tickerid, "D", high[1], lookahead=barmerge.lookahead_off)

bool crossUp = close > dHigh1 and close[1] <= dHigh1[1]

if crossUp and strategy.position_size == 0
    strategy.entry("L", strategy.long, qty=1)

if close < dHigh1 * 0.995 and strategy.position_size > 0
    strategy.close("L")

Overview

PF MTF probe 04 — D high[1] break enters a long position of one unit upon detection of this cross-up condition and closes the position when the close falls below 99.5 percent of the daily high. The script plots signals directly on the price chart. It operates with pyramiding set to one and provides no additional stop-loss rules beyond the 0.995 threshold exit.

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

Breakout, Mean reversion

Markets

Crypto

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

BBPullback

by hasnocool
106 stars

This strategy executes pullback trades based on internally computed Bollinger Bands and candle price action directly on the main price chart. It tracks breakout and pullback states to trigger long and short entries. Users can select among three distinct take p

Strategy v5 Volatility & bandsMean reversion
Updated 2 years ago · GPL-3.0 GitHub repository of BBPullback
13 stars

This strategy identifies volume-based rebound signals on the price chart. It detects three or more consecutive lower volume candles followed by a higher volume candle, with price remaining lower from the start of the volume sequence, signaling potential long e

Strategy v5 VolumeBreakout
Updated 1 year ago · None stated GitHub repository of Ruckard Voladder D002

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