Strategy · Pine Script v6 · On the chart

PF TV golden 41 - partial qty percent

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

The strategy enters a long position of two lots at 1:15 on the hour when no position is open.

View on GitHub

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

28 lines of Pine Script v6 from validation/bracket-partial-exit-qty-percent-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
//
// PF TV golden 41 - partial exit with qty_percent
//
// Purpose: isolate strategy.exit(..., qty_percent=50) and remaining-position handling.
// 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 TV golden 41 - partial qty percent", shorttitle="PF_G41_PARTIAL", overlay=true,
     initial_capital=1000000,
     commission_type=strategy.commission.percent, commission_value=0, slippage=0,
     default_qty_type=strategy.fixed, default_qty_value=2, pyramiding=1,
     process_orders_on_close=false)

enterLong = hour == 1 and minute == 15 and strategy.position_size == 0

if enterLong
    strategy.entry("L", strategy.long, qty=2, comment="two lots")

if strategy.position_size > 0
    entry = strategy.position_avg_price
    strategy.exit("HALF_TP", "L", limit=entry * 1.003, qty_percent=50, comment="half tp")
    strategy.exit("REST_SL", "L", stop=entry * 0.994, comment="rest stop")

if strategy.position_size > 0 and hour == 9 and minute == 15
    strategy.close("L", comment="timeout")

Overview

PF TV golden 41 - partial qty percent then places a take-profit order for half the position at 0.3 percent above the average entry price and a stop-loss order for the remaining half at 0.6 percent below the average entry price. The position is closed at 9:15 on the hour. The strategy draws on the price chart with overlay enabled and uses fixed lot sizing with pyramiding enabled.

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

Sessions & time, Scalping, Trend

Markets

Crypto

Timeframes

M15-H1

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

Andean Scalping

by hasnocool
106 stars

Andean Scalping is a Pine Script v5 strategy template designed for backtesting trading signals. It features session and date-range filtering, directional trade toggles for long and short entries, and optional trend filtering tools including higher-timeframe EM

Strategy v5 TrendMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of Andean Scalping

ATOM 1m scalp HK

by dearvn
43 stars

This overlay strategy targets one-minute ATOM scalps. It tracks pivot highs and lows as resistance and support, compares a three-period EMA with a multi-stage smoothed close, and flags long or short when price crosses that curve in the matching direction. Dail

Strategy v5 ScalpingSupport & resistance Repaints
Updated 2 years ago · None stated GitHub repository of ATOM 1m scalp HK

1-Min Gold Taylor Technique

by eddiebelaval
7 stars

This intraday strategy implements session-based trading rules tailored for gold on short timeframes. It tracks the Asian session price range, VWAP, 20-period EMA, and previous day high and low levels to identify liquidity sweeps during London and New York trad

Strategy v6 Sessions & timeSupport & resistance
Updated 3 months ago · None stated GitHub repository of 1-Min Gold Taylor Technique

QQQ 5min Pure Runner

by yalili8521
2 stars

This strategy identifies trend continuation and accumulation setups on 5-minute charts. It enters long or short positions based on an aligned moving average stack, rising or falling price grinds within a lookback period, and a maximum bar size threshold to avo

Strategy v6 TrendMoving averages
Updated 7 days ago · None stated GitHub repository of QQQ 5min Pure Runner
257 stars

Donald - Test Logic Futures is an overlay strategy designed for intraday futures trading. It combines kernel regression functions with exponential moving averages to evaluate price retracements and entry timing. Trades are filtered by session execution windows

Strategy v5 TrendMoving averages Repaints
Updated 6 weeks ago · None stated GitHub repository of Donald - Test Logic Futures

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