Strategy · Pine Script v6 · On the chart

Parity probe 06 - 50% equity sizing

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

This strategy opens a long position at the start of each Monday at midnight by sizing it to 50% of current equity divided by the close price.

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/analyzer-parity-edge-margin-50-pct-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
//
// Parity probe 06 — explicit qty at 50% of equity (moderate margin pressure)
//
// Purpose: bisect the margin-tolerance regime between parity-probe-03
// (100% equity, hits the boundary every entry, 31 engine extras vs TV)
// and parity-probe-05 (10% equity, no margin pressure expected).
//
// At 50% of equity, qty * fill_price ≈ 0.5 × equity at every entry —
// no slippage-driven margin overshoot is ever possible (next bar's
// open would have to ~double the prior close). If engine and TV
// AGREE on every Monday here too, then TV's "extra rejections" in
// probe-03 are SOLELY a strict-margin behavior at the 1× boundary
// and the engine's tolerance / scale-down policy is the only knob
// that needs adjustment to close the IES gap. If engine and TV
// DISAGREE here, there is some other equity / position-size rule
// in TV's broker emulator that we have not yet modeled, and probe-04
// (auto-sizing path) will tell us whether that rule is shared by
// the implicit-qty code path or unique to explicit qty.
//
// TV setup: 15m chart on BINANCE:ETHUSDT.P, same window as
// data/ohlcv_ETH-USDT-USDT_15m.csv. Export "List of Trades" to
// ``tv_trades.csv`` in this folder.
//@version=6
strategy("Parity probe 06 - 50% equity sizing", shorttitle="par_p06", 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=0, process_orders_on_close=false)

// ---- engine -------------------------------------------------------
bool fire = dayofweek == 2 and hour == 0 and minute == 0 and strategy.position_size == 0

// qty encodes 50% of strategy.equity / close.
float qty_dyn = math.round(strategy.equity * 0.5 / close * 1000) / 1000

if fire and qty_dyn > 0
    strategy.entry("E", strategy.long, qty=qty_dyn, comment="qty = 50% equity / close")

if strategy.position_size > 0 and bar_index > strategy.opentrades.entry_bar_index(0)
    strategy.close("E", comment="next-bar flatten")

Overview

Parity probe 06 - 50% equity sizing automatically flattens the position on the next bar close. No stop loss or take profit is used. The strategy runs on any chart and draws its entries and exits directly on the price chart. The main setting controls the equity-based position size. It has no input parameters.

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, Mean reversion

Markets

Any symbol

Timeframes

Any timeframe

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

3C QFL Mean Reversal

by hasnocool
106 stars

3C QFL Mean Reversal is a strategy based on the Quickfinger Luc (QFL) trading methodology. It identifies breakdown buying opportunities below established price base levels and enters mean-reversion trades. The strategy includes multi-safety order DCA scaling,

Strategy v5 Mean reversionSupport & resistance Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of 3C QFL Mean Reversal
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
5 stars

This strategy enters one long trade when the bar low comes within a set point tolerance of the prior day's low and the close finishes above that level. Entries are allowed only inside a UTC session and are blocked after a Friday cutoff hour. It stays flat unti

Strategy v5 Support & resistanceMean reversion Repaints
Updated 4 months ago · MIT GitHub repository of PDL — Prior Day Level Retest (Bull)
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]
4 stars

Lucid 100K is an automated evaluation strategy tailored for micro futures contracts such as MES, MGC, and MNQ on lower timeframes. It operates a two-phase state machine that moves from an initial risk-averse lock-in phase to an expanded payout phase once targe

Strategy v6 TrendMean reversion
Updated yesterday · None stated GitHub repository of Lucid 100K (MES/MGC/MNQ)
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 周末布林带策略

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