ZeroGEX Daily Gamma LevelsManually plot key options-positioning levels on your chart: Gamma Flip,
Call Wall, Put Wall, and Max Gamma / Pin.
These levels are used by SPY, SPX, and QQQ traders to identify potential
support, resistance, pinning zones, and volatility-regime shifts.
HOW TO USE
1. Add the indicator.
2. Open Settings and enter today's Gamma Flip, Call Wall, Put Wall, and
Max Gamma / Pin. Each draws as a horizontal line with a price label,
plus an on-chart info box. Set any level to 0 to hide it. Optional
price-cross alerts are included.
This script is manual-entry only — it does not pull data. Daily gamma
levels are published for free at zerogex.io.
For informational and educational purposes only. Not financial advice. Indicator

Seasonality: Forex Indices [invincible3]Seasonality: Forex Index
Seasonality: Forex Index is a visual seasonality dashboard designed to help traders analyze historical yearly patterns across major currency indexes.
The indicator displays compact 365-day seasonal mini charts directly on the price chart. Each currency index is shown in its own separate panel, allowing traders to quickly compare seasonal strength, weakness, turning points, and recurring calendar-based tendencies throughout the year.
Included forex indexes:
• Australian Dollar
• Canadian Dollar
• Swiss Franc
• Dollar Index
• Euro
• British Pound
• Japanese Yen
Each currency includes two seasonal curves:
Blue Line — All Years Average
Shows the long-term historical seasonal tendency for the selected currency index.
Yellow Line — Weighted Average
Shows a weighted seasonal curve designed to give more importance to recent seasonal behavior while still preserving the broader historical pattern.
The dashboard is fully customizable. Users can enable or disable individual currency indexes, choose whether to display the All Years curve, the Weighted Average curve, or both, and adjust the widget width, distance from candles, column spacing, panel height, row gap, and dashboard placement.
Key Features:
• Seasonality dashboard for major forex indexes
• Includes AUD, CAD, CHF, DXY, EUR, GBP and JPY
• 365-day calendar-based seasonal curves
• All Years average and Weighted Average comparison
• Separate mini chart for each currency index
• Monthly grid lines and month labels
• Adjustable dashboard size, spacing, and placement
• Right-side dashboard placement option
• Auto-theme color support
• Manual customization for line colors, grid, background, and text
• Clean visual panels for quick seasonal comparison
This indicator is useful for identifying periods where major currencies have historically shown stronger or weaker seasonal tendencies. It can help traders add seasonal context to forex pairs, dollar strength analysis, macro bias, trend structure, and technical setups.
The seasonality curves are intended as a relative historical guide, not exact price forecasts. This indicator does not generate direct buy or sell signals. Seasonality should be used as a supporting research tool together with price action, trend analysis, macro fundamentals, confirmation, and proper risk management.
Indicator

MA Z-Score DeviationA valuation oscillator that measures how far price has stretched from its statistical fair value defined here as its moving average, expressed as a standardized score rather than raw price units.
How it works
Base: A moving average (SMA, EMA, or WMA) serves as the reference "fair value" line. Deviation from this baseline is calculated as a log ratio (log(price / MA)) rather than a simple price difference, so the reading stays comparable across different price levels and time periods: a 5% premium or discount reads the same whether the instrument is at $10 or $500.
Standardization: the deviation is divided by its own rolling dispersion to produce a score that expresses how rich or cheap price is relative to its typical range, not just in absolute terms.
Two dispersion methods are available:
Standard Deviation: the classical measure of typical variability.
MAD: a median-based measure that's more resistant to distortion from one-off outlier bars.
Blend: a weighted combination of both, adjustable via the MAD Weight input.
Display scaling: the score is passed through a bounded transform for cleaner visual scaling on the chart, while the underlying valuation ranking is preserved.
Inputs
Source & MA type (SMA/EMA/WMA) and length
Lookback length for the dispersion calculation, independent from the MA length, letting you compare long-term fair value against recent volatility conditions
Dispersion method (Stdev / MAD / Blend) and blend weight
Display scaling factor
Reading the indicator
Positive values indicate price is trading at a premium to its baseline; negative values indicate a discount.
Values beyond ±2 suggest a notable premium/discount relative to recent conditions; beyond ±3 suggests a substantial one.
Because the baseline is statistical rather than fixed, the "fair value" and its bands adjust automatically as market conditions evolve.
Notes / limitations
This measures statistical richness/cheapness relative to a moving average, not intrinsic or fundamental value; it's a technical valuation lens, not a fundamental one.
Financial return distributions have fatter tails than a normal distribution assumes, so extreme readings can occur more frequently than the underlying statistical model implies; treat scores as relative positioning, not precise probabilities.
Alerts trigger only on confirmed bar closes to avoid firing on intrabar noise. Indicator

Indicator

BTC Halving Indicator
**What it does:**
- Draws an **orange vertical line + label** at each past halving: 28 Nov 2012, 9 Jul 2016, 11 May 2020, and 20 Apr 2024
- Draws a **dashed aqua line** at the estimated 5th halving (~April 2028) when it's close enough to appear on your chart
- Shows a **live counter table** in the top-right: days since the last halving and estimated days until the next one
- Has settings to change colors and toggle the labels/counter on or off
**How to install it in PulseWire:**
1. Open a BTC chart (e.g. BTCUSD) on pulsewire.com
2. Click **Pine Editor** at the bottom of the screen
3. Delete whatever's in the editor, paste in the full contents of the file
4. Click **Save**, then **Add to chart**
Two tips: use the **daily or weekly timeframe** — on low timeframes like 5m, PulseWire doesn't load history back to 2012, so the older halving lines won't appear. And note the 2028 date is an estimate; the actual halving happens at block 1,050,000, so the real date drifts slightly with block times.
Want me to add anything, like cycle-phase background shading or price-at-halving markers? Indicator

Seasonality: Grains & Livestock [invincible3]Seasonality: Grains & Livestock
Seasonality: Grains & Livestock is a visual seasonality dashboard designed to help traders analyze historical yearly patterns across major grain and livestock futures markets.
The indicator displays compact 365-day seasonal mini charts directly on the price chart. Each market is shown in its own separate panel, allowing traders to quickly compare seasonal strength, weakness, turning points, and recurring calendar-based tendencies throughout the year.
Included markets:
• Chicago Wheat
• Corn
• Soybean Meal
• Soybean Oil
• Soybeans
• Lean Hogs
• Live Cattle
Each market includes two seasonal curves:
Blue Line — All Years Average
Shows the long-term historical seasonal tendency for the selected market.
Yellow Line — Weighted Average
Shows a weighted seasonal curve designed to place more emphasis on recent seasonal behavior while still preserving the broader historical pattern.
The dashboard includes flexible layout controls so users can adjust widget width, distance from candles, column spacing, panel height, row gap, and overall dashboard placement. Individual markets can be enabled or disabled, and users can choose whether to display the All Years curve, the Weighted Average curve, or both.
Key Features:
• Seasonality dashboard for grains and livestock
• Includes wheat, corn, soybeans, soybean meal, soybean oil, lean hogs, and live cattle
• 365-day calendar-based seasonal curves
• All Years average and Weighted Average comparison
• Separate mini chart for each market
• Monthly grid lines and month labels
• Adjustable widget size and spacing
• Right-side dashboard placement option
• Auto-theme color support
• Manual customization for line colors, grid, text, and background
• Clean visual panels for quick seasonal comparison
This indicator is useful for identifying historical periods where agricultural and livestock markets have commonly shown stronger or weaker seasonal tendencies. It can help traders add seasonal context to price action, market structure, trend analysis, supply-demand zones, and fundamental research.
The seasonality data is based on digitized 365-day historical seasonal curves and should be treated as a relative, shape-preserving seasonal guide rather than exact price data.
This indicator does not provide direct buy or sell signals. Seasonality should be used as a supporting research tool together with technical analysis, confirmation, and proper risk management.
Indicator

Seasonality: Soft Commodities [invincible3]Seasonality: Soft Commodities
Seasonality: Soft Commodities is a professional mini-chart seasonality dashboard designed for traders and analysts who want to study recurring yearly patterns in major soft commodities.
The indicator displays 365-day seasonal curves directly on the chart for Cocoa, Coffee, Cotton, Orange Juice, and Sugar. Each commodity is shown in its own compact panel, making it easy to compare seasonal strength, weakness, turning points, and recurring periods of historical tendency throughout the calendar year.
Two seasonal views are available:
Blue Line — All Years Average
Shows the long-term historical seasonal path using the full available dataset.
Yellow Line — Weighted Average
Shows a weighted seasonal curve designed to emphasize more relevant recent behavior while still preserving the broader historical pattern.
The dashboard includes flexible layout controls, allowing users to adjust widget width, distance from price candles, panel height, row spacing, and placement. Individual commodities can be enabled or disabled, and users can choose whether to display the All Years curve, the Weighted Average curve, or both.
Key Features:
• Seasonality curves for Cocoa, Coffee, Cotton, Orange Juice, and Sugar
• Separate mini-panel for each commodity
• Blue All Years seasonal average
• Yellow Weighted Average seasonal curve
• Monthly grid and labels for easy calendar interpretation
• Right-side dashboard placement option
• Adjustable chart width, spacing, and panel height
• Auto-theme colors with manual style customization
• Lightweight visual design built for quick seasonal comparison
This tool is useful for identifying periods where soft commodities have historically shown stronger or weaker seasonal tendencies. It can help traders prepare trade ideas, compare current market behavior against historical patterns, and add a seasonal context layer to technical or macro analysis.
This indicator does not generate direct buy or sell signals. Seasonality should be used as a supporting research tool together with price action, trend analysis, volume, fundamentals, and proper risk management.
Indicator

Lot Size Calculator KOANLot Size Calculator KOAN
Calculadora de tamaño de lote para operar CFDs de índices, pensada principalmente para el NAS100/US100. Muestra un panel fijo en el gráfico con el tamaño de lote exacto que debes operar para arriesgar solo el porcentaje o la cantidad de dinero que tú definas.
¿En qué instrumentos funciona?
Funciona en CFDs de índices cotizados en dólares (USD), siempre que configures correctamente el "Valor por punto por lote" según las especificaciones de tu bróker:
NAS100/US100 (Nasdaq 100)
US30 (Dow Jones)
SPX500/US500 (S&P 500)
US2000 (Russell 2000)
No está pensada para pares de forex tradicionales (EURUSD, GBPUSD…), ya que en forex el cálculo se hace en pips y el valor del pip depende del par; para eso existen calculadoras específicas de forex.
¿Cómo funciona?
El indicador calcula: Lot Size = Riesgo en $ / (Stop Loss en puntos × Valor por punto). Por ejemplo, con un balance de $2000, un riesgo del 1% ($20), un stop loss de 50 puntos y un valor de $1 por punto por lote, el resultado es un lote de 0.4. Así, si el precio toca tu stop loss, pierdes exactamente lo que habías decidido arriesgar, ni más ni menos.
Configuración:
Balance (USD): el capital total de tu cuenta. Es la base sobre la que se calcula el riesgo.
Modo de riesgo: elige cómo quieres definir tu riesgo por operación: como porcentaje del balance ("Porcentaje (%)") o como cantidad fija de dinero ("Dinero ($)"). El panel siempre muestra ambos valores, el que introduces y el que se calcula automáticamente.
Riesgo (%): porcentaje del balance que arriesgas por operación. Solo se usa si el modo es "Porcentaje (%)". Por defecto: 1%.
Riesgo ($): cantidad fija en dólares que arriesgas por operación. Solo se usa si el modo es "Dinero ($)".
Stop Loss (puntos): distancia de tu stop loss en puntos del índice. Ajústalo en cada operación según tu análisis.
Valor por punto por lote (USD): cuánto vale 1 punto de movimiento con 1 lote en tu bróker. En la mayoría de CFDs de NAS100 es $1, pero varía según el índice y el bróker. Revisa siempre las especificaciones del contrato (ver notas abajo).
Posición del panel: dónde se ancla el panel en pantalla (6 opciones: arriba/abajo, izquierda/centro/derecha). El panel es fijo: no se mueve al desplazar el gráfico ni al hacer zoom.
Color del panel: color de fondo del panel.
Color del texto: color del texto del panel.
Tamaño: tamaño del texto y del panel (Small, Medium, Large, XL).
Mostrar en el panel: casillas para elegir qué datos aparecen: Símbolo, Balance, Riesgo (%), Stop Loss, Valor por punto, Riesgo en $ y Lot Size. Desmarca lo que no quieras ver y el panel se compacta automáticamente.
Notas importantes sobre el "Valor por punto"
No todos los índices valen $1 por punto. El valor depende del tamaño de contrato de tu bróker. Ejemplo orientativo: en NAS100 suele ser $1 por punto por lote, pero algunos brókers manejan contratos de $10 o incluso $20 por punto, y en índices como el US30 o el SPX500 el tamaño de contrato también puede variar de un bróker a otro.
Cómo averiguar el valor en tu bróker: consulta las "especificaciones del contrato" del instrumento en tu plataforma (busca el dato "contract size" o "tamaño del contrato"). Otra forma práctica: abre una operación mínima en cuenta demo y observa cuántos dólares cambia tu P/L cuando el precio se mueve 1 punto; ese es el valor que debes introducir (escalado a 1 lote).
La definición de "punto" también puede variar entre brókers. Ante la duda, usa siempre el método de la cuenta demo descrito arriba.
Introduce el valor correcto en el campo "Valor por punto por lote (USD)" antes de confiar en el resultado. Si el valor es incorrecto, el tamaño de lote calculado también lo será.
El símbolo mostrado en el panel se detecta automáticamente del gráfico activo.
Este indicador es una herramienta de gestión de riesgo; no genera señales de compra o venta.
Verifica siempre los cálculos con tu bróker antes de operar con dinero real.
— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —
ENGLISH VERSION
— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —
Lot Size Calculator KOAN
Lot size calculator for trading index CFDs, designed primarily for the NAS100/US100. It displays a fixed panel on the chart showing the exact lot size you should trade to risk only the percentage or dollar amount you define.
Which instruments does it work on?
It works on USD-denominated index CFDs, as long as you correctly set the "Point value per lot" according to your broker's specifications:
NAS100/US100 (Nasdaq 100)
US30 (Dow Jones)
SPX500/US500 (S&P 500)
US2000 (Russell 2000)
It is not designed for traditional forex pairs (EURUSD, GBPUSD…), since forex calculations are done in pips and the pip value depends on the pair; there are dedicated forex calculators for that.
How does it work?
The indicator calculates: Lot Size = Risk in $ / (Stop Loss in points × Point value). For example, with a $2000 balance, 1% risk ($20), a 50-point stop loss and a point value of $1 per lot, the result is a lot size of 0.4. This way, if price hits your stop loss, you lose exactly what you decided to risk — no more, no less.
Settings:
Balance (USD): your total account capital. This is the base used to calculate your risk.
Risk mode: choose how you want to define your risk per trade: as a percentage of your balance ("Porcentaje (%)") or as a fixed dollar amount ("Dinero ($)"). The panel always displays both values — the one you enter and the one calculated automatically.
Risk (%): percentage of your balance risked per trade. Only used when the mode is set to percentage. Default: 1%.
Risk ($): fixed dollar amount risked per trade. Only used when the mode is set to money.
Stop Loss (points): your stop loss distance in index points. Adjust it on every trade according to your analysis.
Point value per lot (USD): how much 1 point of movement is worth with 1 lot at your broker. On most NAS100 CFDs it's $1, but it varies by index and broker. Always check your broker's contract specifications (see notes below).
Panel position: where the panel is anchored on screen (6 options: top/bottom, left/center/right). The panel is fixed — it doesn't move when you scroll or zoom the chart.
Panel color: background color of the panel.
Text color: color of the panel text.
Size: text and panel size (Small, Medium, Large, XL).
Show on panel: checkboxes to choose which data is displayed: Symbol, Balance, Risk (%), Stop Loss, Point value, Risk in $ and Lot Size. Untick what you don't want to see and the panel compacts automatically.
Important notes about "Point value"
Not all indices are worth $1 per point. The value depends on your broker's contract size. As a reference: on NAS100 it's usually $1 per point per lot, but some brokers use contracts of $10 or even $20 per point, and on indices like US30 or SPX500 the contract size can also vary from broker to broker.
How to find the value at your broker: check the instrument's "contract specifications" on your platform (look for "contract size"). A practical alternative: open a minimum-size trade on a demo account and watch how many dollars your P/L changes when price moves 1 point; that's the value you should enter (scaled to 1 lot).
The definition of a "point" can also vary between brokers. When in doubt, always use the demo account method described above.
Enter the correct value in the "Point value per lot (USD)" field before trusting the result. If the value is wrong, the calculated lot size will be wrong too.
The symbol shown on the panel is automatically detected from the active chart.
This indicator is a risk management tool; it does not generate buy or sell signals.
Always verify the calculations with your broker before trading real money. Indicator

Seasonality: Stock Indices [invincible3]Seasonality: Stock Indices
Seasonality: Stock Indices is a clean dashboard-style indicator designed to display historical seasonal tendencies for major global stock indices directly on the PulseWire price chart.
The indicator includes six separate seasonal mini-charts:
Australian ASX 200 — seasonal data from 2001 to 2020
FTSE 100 — seasonal data from 1985 to 2020
German DAX — seasonal data from 1999 to 2020
Nasdaq 100 — seasonal data from 1996 to 2020
S&P 500 — seasonal data from 1980 to 2020
Dow 30 — seasonal data from 1980 to 2020
Each panel displays a full 365-day seasonal curve, allowing traders to study how each index has historically performed throughout the calendar year. The indicator plots both the long-term All Years average and a Weighted Average curve, making it easier to compare broad historical behavior with a more weighted seasonal tendency.
The dashboard is arranged in a compact multi-panel layout and is designed to stay visually separated from candles, so it does not disturb the main price chart. Users can adjust the widget width, distance from candles, panel height, row spacing, column gap, and dashboard placement on either the right or left side of price.
Automatic dark/light theme detection is included, helping the dashboard remain readable across different PulseWire chart themes. Manual customization is also available for the grid color, background, text color, All Years line, Weighted Average line, and line width.
This indicator is useful for index traders, swing traders, macro analysts, seasonal researchers, and market-timing studies. It helps users compare current index behavior with long-term historical seasonal patterns across major U.S., European, Australian, and technology-focused equity benchmarks.
Key Features:
Seasonal dashboard for major global stock indices
Includes ASX 200, FTSE 100, DAX, Nasdaq 100, S&P 500, and Dow 30
Full 365-day seasonal curves
All Years average line
Weighted Average line
Adjustable dashboard size and placement
Designed to stay away from candles
Auto dark/light theme support
Manual color customization
Election seasonality is intentionally excluded
Built for visual seasonal analysis
The seasonal values are approximate and digitized from historical seasonal data screenshots. This indicator is intended for educational and analytical purposes only. It does not provide financial advice, investment recommendations, or direct buy/sell signals. Historical seasonal tendencies do not guarantee future market performance.
Indicator

Seasonality: Metals [invincible3]Seasonality: Metals
Seasonality: Metals is a visual dashboard-style indicator designed to display historical seasonal tendencies for major metals directly on the PulseWire price chart.
The indicator includes five separate seasonal mini-charts:
Copper — seasonal data from 1960 to 2020
Gold — seasonal data from 1975 to 2020
Palladium — seasonal data from 1978 to 2020
Platinum — seasonal data from 1970 to 2020
Silver — seasonal data from 1969 to 2020
Each panel displays a full 365-day seasonal curve, helping traders observe how each metal has historically behaved throughout the calendar year. The indicator plots both the long-term All Years average and a Weighted Average curve, allowing users to compare broad historical seasonality with a more weighted seasonal tendency.
The dashboard is built with a clean five-panel layout: Copper and Gold on the top row, Palladium and Platinum on the middle row, and Silver on the bottom-left panel. The layout is designed to stay away from candles so it does not interfere with price action while still giving traders a clear view of seasonal structure.
Users can customize the widget width, distance from candles, panel height, row spacing, column gap, and dashboard placement on either the right or left side of the chart. The script also includes automatic dark/light theme detection, while still allowing manual customization of the background, grid, text, and seasonal line colors.
This indicator is useful for commodity traders, macro analysts, metals investors, and seasonal-market researchers who want to compare current price behavior with long-term historical seasonal patterns in the metals market.
Key Features:
Seasonal dashboard for major metals
Includes Copper, Gold, Palladium, Platinum, and Silver
365-day seasonal curves
All Years average line
Weighted Average line
Clean mini-chart layout
Adjustable widget size and placement
Dashboard can be placed left or right of price
Auto dark/light theme support
Manual color customization
Designed to stay visually separated from candles
The seasonal values are approximate and digitized from historical seasonal data screenshots. This indicator is intended for educational and analytical purposes only. It does not provide financial advice, investment recommendations, or direct buy/sell signals. Historical seasonal tendencies do not guarantee future market performance.
Indicator

Seasonality: U.S. Treasuries [invincible3]Seasonality: U.S. Treasuries
Seasonality: U.S. Treasuries is a visual dashboard-style indicator designed to display historical seasonal tendencies for major U.S. Treasury futures directly on the price chart.
The indicator includes three separate seasonal mini-charts:
U.S. 10-Year Treasury Note — seasonal data from 1983 to 2020
U.S. 5-Year Treasury Note — seasonal data from 1989 to 2020
U.S. Treasury Bond — seasonal data from 1978 to 2020
Each panel shows a full 365-day seasonal curve, allowing traders to observe how these Treasury instruments have historically behaved throughout the calendar year. The indicator plots both the long-term **All Years average** and a **Weighted Average** curve, making it easier to compare broad historical behavior with a more weighted seasonal tendency.
The dashboard is built to be clean, compact, and flexible. Users can adjust the widget width, distance from candles, panel height, row spacing, column gap, and placement on either the right or left side of the chart. This helps keep the seasonal panels separated from price action while still making the seasonal structure easy to read.
Automatic theme detection is included, so the dashboard adapts to both dark and light PulseWire chart themes. Users can also manually customize colors for the grid, background, text, All Years line, and Weighted Average line.
This indicator is useful for traders, analysts, and macro-market observers who want to study historical seasonal patterns in U.S. Treasury markets and compare current market behavior with long-term seasonal tendencies.
Key Features:
Seasonal mini-dashboard for U.S. Treasury markets
Includes 10Y Note, 5Y Note, and Treasury Bond
365-day seasonal curves
All Years average line
Weighted Average line
Adjustable widget size and placement
Clean layout placed away from candles
Auto dark/light theme support
Manual color customization
Designed for visual seasonal analysis
This indicator is intended for educational and analytical purposes only. It does not provide financial advice, investment recommendations, or direct buy/sell signals. Seasonal tendencies are based on historical data and do not guarantee future market performance.
Indicator

Setup Expectancy LabSetup Expectancy Lab
█ OVERVIEW
The Setup Expectancy Lab is a measurement instrument, not a signal generator. You point it at a signal you already have — an event stream published by another indicator, or any plotted price line such as an EMA or VWAP — and it simulates the identical bracket trade on every occurrence across the loaded chart history. It then reports what that setup has actually been worth under one fixed mechanical rule: sample size, win rate with honest confidence intervals, expected R per trade, average time to resolution, and excursion diagnostics — optionally split by market regime.
It was originally built as the measurement companion to the HTF Regime Navigator indicator, but it deliberately depends on nothing: the Price Line modes derive events from any visible plot on your chart, so the Lab is fully useful on its own from the first minute. The question it answers is the one most traders never quantify: is this setup worth taking — and under which conditions?
This is an indicator, not a strategy script. It places no orders and does not use the Strategy Tester; it is a statistics table driven by an internal trade simulator.
█ WHY IT'S ORIGINAL AND USEFUL
Pine has strategy() for backtesting complete systems. What it lacks is a lightweight, reusable instrument for measuring the quality of a RAW SIGNAL — any signal, from any indicator — under one fixed, comparable rule, without writing a new strategy script for every idea. That is the gap this tool fills, and several of its mechanisms are, to my knowledge, novel in combination:
• Universal signal intake. Three interpretation modes for the wired source: a ±1 event-stream protocol (any indicator that publishes hidden data plots), Price Line: Cross (long = close crosses above the wired line, short = below), and Price Line: Test (price holding above dips to touch the line and closes back above; mirrored for shorts). The line modes mean any plotted level — an EMA, a VWAP, a band — becomes a measurable entry with zero companion requirements.
• A data-integrity halt system. Pine source inputs default to `close`, and a lab wired to `close` would record every candle as an entry — confident-looking, meaningless statistics. This tool refuses: recording HALTS loudly until the source is wired, and type-aware validity checks catch both mistakes in both directions (a dollar-valued line wired as an event stream, and a ±1 stream wired as a line). Recording garbage that looks like data is worse than recording nothing.
• Statistical honesty machinery. Win rates carry a Wilson 95% confidence interval, chosen over the normal approximation because it stays honest at small N and extreme rates. A ★ is awarded only when the EXACT Wilson lower bound clears the bracket's breakeven win rate (stop ÷ (stop + target), shown live in the header) — meaning the edge is statistically distinguishable from chance at 95%. Rows below a minimum sample render dimmed, and tooltips carry gap-robust medians alongside means.
• A built-in control group. When the optional gate is on, every gate-REJECTED signal is fully simulated anyway with the identical bracket into a ✂ Reject row. One instance therefore runs a gated-vs-ungated A/B automatically: if the rejected signals underperform the accepted ones, the filter is earning its keep; if they carry edge, the filter is discarding value.
• A live pre-flight footer. A Next row shows exactly what would happen if a long or short confirmed at this bar's close — records, gate-rejected, in cooldown, direction-filtered, or halted — with an evaluation order that mirrors the recording logic precisely.
█ THE BRACKET ENGINE, MECHANICALLY
Entry is taken at the close of the confirmed signal bar. Target and stop are ATR multiples (defaults: 2×ATR(14) target, 1×ATR(14) stop), with a horizon expiry (default 20 bars; expiry marks to close and counts as a win only if R > 0). The simulator is deliberately conservative:
• Gap-aware: a bar OPENING beyond the stop or target fills at the open, not at the ideal price.
• Stop-first: when a single bar's range could have hit both levels, the loss is booked — OHLC cannot order intrabar events, so ambiguity always resolves against the setup.
• Confirmed bars only; a trade recorded this bar is not evaluated until the next. No lookahead anywhere.
The breakeven win rate for the current bracket — stop ÷ (stop + target), 33% at the defaults — is displayed in the Win% header, so every number in the table is read against the bar it must clear.
█ REGIME CONDITIONING (OPTIONAL)
Wire the Regime Source to a companion indicator's regime-code stream (protocol: 2 = Trend Up, 1 = Accumulation, 0 = Neutral, −1 = Distribution, −2 = Trend Down, read at the entry bar) and results split into five regime rows plus All — the same signal often carries edge in one environment and none in another, and this is how you find out. With no regime source on the chart, switch Condition by Regime off and the Lab reports a single All row. If the regime source is miswired, entries bucket to Neutral, the header warns, and the All row stays valid.
█ IMPORTANT: WHAT YOU SEE ON FIRST ADD (⛔)
When you first add the Lab, the table header reads "⛔ WIRE SIGNAL SOURCE" and nothing records. This is intentional, not a defect. Pine cannot default a source input to an external plot — it defaults to `close` — and an unwired lab would otherwise record every bar as an entry. Open Settings → Sources, point Signal Source at a real stream or a plotted line, choose the matching Signal Type, and the entire chart history replays instantly: you start with a populated table, not an empty one. The header tooltip explains every halt state and how to clear it.
█ WIRING RECIPES
• Any moving average, no companions needed: Signal Type = Price Line: Cross, Signal Source = the MA's plot. The table now answers "what has buying this line's reclaim been worth?" Use the Direction Filter (Long Only) if you only care about one side, and note that in Both mode each row mixes reclaim-longs with breakdown-shorts of the same line.
• The pullback test: Signal Type = Price Line: Test on a fast EMA, Dedupe Cooldown 3–5 (a trend riding the line can legitimately test it on consecutive bars). Cross bars are deliberately excluded from Test, so the two modes partition events instead of double-counting.
• An event-emitting companion: Signal Type = Event Stream (±1), Signal Source = the companion's hidden event plot (values ≥ +0.5 = long event, ≤ −0.5 = short). Impulse mode records one entry per transition; State mode records every qualifying bar.
• Your own script, in one line: add `plot(myCondition ? 1 : 0, display = display.none)` to anything you've written and it becomes a measurable signal here.
• Gate + A/B: enable the gate, wire a confluence/zone/divergence stream (or a price line — "only while above the 200 EMA" is a two-click gate), set the memory window, and compare the real rows against the ✂ Reject row.
Because Pine scripts cannot read the NAME of a wired source — only its values cross into the script — you label what you wired via the Signal and Gate nickname inputs; the table and footer stay legible no matter what is connected.
█ QUICK START: COMPANION SETTINGS FOR THE HTF REGIME NAVIGATOR
The Lab was designed alongside the HTF Regime Navigator (HRN), whose hidden bus streams map one-to-one onto the Lab's inputs. If you run both, this is the recommended starting configuration — it measures HRN's mechanical entry signal, split by HRN's own regime read:
• Signal Type = Price Line: Test (the Impulse/State dropdown is ignored in line modes — one less thing to set)
• Signal Mode = Impulse (transitions only) — HRN's streams emit one ±1 event per confirmation, so the default is already correct.
• Regime Source = HTF Regime Navigator: EXT: Regime Code · Condition by Regime = ON. The footer's Regime row should immediately show the same regime HRN's dashboard displays — a five-second wiring check.
• Direction Filter = Both · Dedupe Cooldown = 0 — HRN's own confirmation closes and signal cooldown already space its entries; a Lab cooldown on top would drop legitimate signals.
• Confluence Gate = OFF for the first pass. Establish the unconditioned baseline before testing any filter.
• Bracket Engine = defaults (target 2×ATR(14), stop 1×ATR(14), 20-bar horizon; breakeven 33%, shown live in the header). Keep the bracket identical across every configuration you intend to compare.
• Table Position = Middle Right — the default, chosen specifically so it does not collide with HRN's top-right dashboard or bottom-left breakdown table.
Once the baseline has a sample, the natural second pass is the gate A/B: Enable Gate · Gate Type = Event/State Stream (±1) · Gate Source = HTF Regime Navigator: EXT: Confluence State (or EXT: Golden Zone State) · Gate Nickname = "Confluence" · Gate Memory = 0–3 · Direction Logic = Match Signal Direction · Reject Row = ON. The real rows now answer "the signal inside the confluence zone," and the ✂ Reject row answers "the same signal outside it" — the filter's value, in one table. HRN's EXT: Spring / Upthrust stream deserves the same treatment as a Signal Source in a second instance: what a qualified spring has been worth, per regime, under the identical bracket.
█ QUICK START WITH THE HTF REGIME NAVIGATOR (HRN)
The Lab was built alongside the HTF Regime Navigator, and the recommended starting configuration measures the setup that system is built around: price holding above the fast EMA, dipping to test it, and closing back above — the reclaim-and-test entry. HRN's fast EMA is a visible plot, so this recipe also demonstrates the Price Line mode: no event stream required, just the line itself.
Baseline — the signature entry, measured raw:
• Signal Type = Price Line: Test (the Impulse/State dropdown is ignored in line modes — one less thing to set)
• Signal Source = HTF Regime Navigator: MA 1 (the fast EMA — chart-timeframe 50 at HRN's defaults) · Nickname "EMA1 Test"
• Regime Source = HTF Regime Navigator: EXT: Regime Code · Condition by Regime = ON
• Direction Filter = Long Only for the classic buy-the-test question — in Both, each regime row mixes tests of the EMA as support with tests of it as resistance
• Dedupe Cooldown = 3 — Test mode fires on each qualifying bar, and price riding an EMA in a trend can legitimately test it on consecutive bars; 3–5 thins them to distinct episodes
• Gate = OFF · Bracket Engine = defaults (2×ATR target, 1×ATR stop, 20-bar horizon → 33% breakeven)
Result: what buying the test of HRN's fast EMA has been worth on this chart, split by the regime it fired in. Wiring note: because MA 1 is a dollar-valued line, it must be wired under a Price Line type — under Event Stream it correctly trips the ⛔ magnitude halt, whose message points to this exact fix.
The upgrade — "inside the fibs" (location on trial):
• Enable the Gate · Gate Type = Event/State Stream (±1)
• Gate Source = HTF Regime Navigator: EXT: Golden Zone State (or EXT: Confluence State) · Nickname "Golden Zone"
• Gate Memory = 0–3 (state streams stay active while the condition holds, so a small window is correct — the default 8 is tuned for impulse-style divergence gates) · Direction Logic = Match Signal Direction
Result: the real rows become "the EMA test inside the Fibonacci value zone" and the ✂ Reject row becomes the identical test outside it — one table answering whether location is paying rent on this symbol.
Worth a second instance: Signal Type = Price Line: Cross on the same MA 1 measures the reclaim itself rather than the later test (the two modes partition events — a cross bar never double-counts as a test), and Signal Source = EXT: Entry Signal Confirmed (Event Stream, Impulse, Dedupe Cooldown 0 — HRN's engine applies its own confirmation and cooldown) measures the full mechanical signal engine. Keep brackets identical across instances so the expectancies are comparable. The Lab's table defaults to Middle Right specifically so it doesn't collide with HRN's Top Right and Bottom Left tables.
█ READING THE TABLE
• N — resolved simulated trades in the bucket. Rows below the minimum sample dim automatically.
• Win% — win rate ± the Wilson 95% half-width (the displayed ± approximates an asymmetric interval; the exact bounds are in each cell's tooltip). ★ = the exact lower bound clears the bracket's breakeven rate.
• Exp R — average R per resolved trade, the expectancy.
• Bars — average bars from entry to resolution.
• L·MFE — average maximum favorable excursion of LOSING trades, in R: how far losers ran in your favor before dying. Approaching the target multiple suggests the target is too far.
• W·MAE — average maximum adverse excursion of WINNING trades, in R: heat winners took. Well under 1.0 suggests the stop is wider than the setup needs. Excursions exclude each trade's resolution bar (OHLC cannot order intrabar events), so both are slightly understated — conservative by design.
• Last K — a rolling window over the most recent resolved trades with its own interval and a median-R tooltip; compare against All to spot edge decay or improvement.
• ✂ Reject — the gate's control group, aggregate only.
• Conditions footer — the live signal read (nickname, type, ▲/▼ when firing this bar), the live regime bucket, gate ages versus the memory window, and the Next pre-flight row (✔ records · ✂ gated · ⏸n cooldown · ✗off filtered · ⛔ halted).
Entry markers print on the chart for every recorded trade (five styles, fully customizable), and gated-out signals can be marked in gray so you can see exactly what a filter removed.
█ HONEST LIMITATIONS
• The statistics measure raw signal behavior under one fixed mechanical rule on the loaded chart's history. They are not a backtest of a complete trading plan, they include no commissions, slippage, or position sizing, and they are not predictive of future results.
• One symbol per instance — Pine cannot aggregate across a portfolio.
• The confidence interval assumes independent trades; overlapping open positions weaken it somewhat (stated in the header tooltip rather than hidden).
• Small samples are noise. The dimming and the intervals exist precisely so that small samples LOOK like noise.
█ SETTINGS NOTES
Every input carries a tooltip. The highest-leverage settings: Signal Type and Source (the wiring), the Bracket Engine multiples and horizon (changing the bracket changes the breakeven rate — the header recomputes it live), the Dedupe Cooldown for dense line tests, the Gate group with its memory window and direction logic, and Min N for the dimming threshold. For side-by-side comparisons, run multiple instances with tables at different positions — and keep the brackets identical, because expectancy is only comparable when the trade definition is fixed.
█ DISCLAIMER
This script and its description are for educational and informational purposes only and do not constitute financial advice. Win rates and expectancies shown are measurement outputs of historical, single-symbol simulations under one fixed mechanical rule — instruments for evaluating a process, never a promise about future trades. Always do your own research and manage your own risk. Indicator

KRT Kalman Regime Tricolor# 📊 KRT — Kalman Regime · Tricolor
**Designed and statistically validated for 🥇 GOLD and Ξ ETHEREUM.** A regime compass, not a buy signal: KRT reads the market on three layers — background regime, trend, your candle — and shows you which way the wind blows at every moment: 🟢 long · 🔴 short · 🔵 wait.
**⚡ ZERO lookahead, ZERO repaint.** Every signal appears in real time using only the information available at that moment, and whatever is printed at a bar close never changes afterwards. Many indicators look perfect because they quietly redraw the past — KRT is built for the opposite: what you see in replay is exactly what you would have seen live.
## ⚡ Quick start (30 seconds)
The colored BACKGROUND = the underlying regime.
Green 🟢 = bull regime installed → longs carry. Red 🔴 = bear regime installed → shorts carry. No color = no regime → caution.
The CURVE trails price like a stop line: below the candles in an uptrend, above them in a downtrend. Price crossing the curve = the reversal.
The curve's intensity = the strength of the authorization.
BRIGHT = trend aligned with the regime. Pale = secondary bias only. Blue = wait.
THE MARKERS — one single rule:
SOLID green or red marker (big triangle OR diamond) = GO. Blue = wait. Small = provisional.
🟢▲ / 🔴▼ BIG triangle — GO: reversal confirmed AND regime aligned.
🟢◆ / 🔴◆ Diamond — Deferred GO: the regime installs while the trend already points that way (often follows a big blue triangle). Same strength as a big colored triangle.
🔵▲ / 🔵▼ BIG blue triangle — reversal confirmed but no regime behind it → wait (a diamond will tell you if it becomes a GO).
▵▿ Small triangles (any color) — early alerts on your chart, ahead of confirmation. Provisional.
No thinking required: solid + colored = apply your strategy · blue = patience · small = not yet.
Drop it on gold or Ethereum, chart timeframe 5m–15m. Run YOUR strategy on top: KRT gives the direction, you handle entries, stops and exits.
## ⚠️ Before you use it
This is an indicator, NOT a strategy: it provides no entry or exit points.
Validated with permutation tests on gold and Ethereum. On Bitcoin the detection displays but the statistical edge is not demonstrated; on major forex pairs it is absent. Test it yourself before using it elsewhere.
The background regime changes slowly (weeks): that is by design — it filters, it does not scalp.
## 🔍 Understanding the display (going deeper)
THE THREE LAYERS
Regime (background, default 8H) — a slow Kalman trend filter with hysteresis: the background only colors once the regime is installed (default 3 days, adjustable). Locked at its own bar close: it does not flicker and does not repaint.
Trend (curve, default 1H) — the exact price level that would flip the trend filter, computed in advance: the distance between price and curve measures the strength of the trend.
Your candle (the chart) — the curve is monitored at your chart's granularity: you see the flip before the 1H close (small triangles), the close confirms it (big triangles).
HOW TO READ IT
Green background + bright green curve + GO = every layer agrees: the most favorable long context. Mirror in red for shorts.
Pale green curve = uptrend without an installed regime — weak bias.
Pale red curve = intraday "breather" (recurring windows of weakness inside an uptrend) — a short-lived bias, not an invitation to swing short.
Blue = no statistical edge. The best trade is often no trade.
After a bullish GO, price often retests the curve before continuing: aim for the retest rather than the impulse.
TIMEFRAMES & SETTINGS
Chart from 1m to 1H (5m–15m recommended).
Trend TF / Regime TF: the only settings an advanced user may change (swing trading: 4H/D).
Regime installation age (default 72h): higher = rarer, more reliable background; lower = more reactive, more false regimes.
Everything else (q values, thresholds, windows): the calibrated and validated core of the model — keep the defaults.
---
KRT is a decision-support tool based on historical data. Past performance does not guarantee future results. Manage your risk. Indicator

MHIDa Strategy Honesty DashboardWHAT IT IS
An honesty dashboard for backtests. It runs the trades of a single, fully editable sample strategy through a strict bench of six checks and shows, with a green/red traffic light, whether the strategy passes or fails. The goal is to expose inflated numbers, not to celebrate them.
WHY THESE PARTS ARE TOGETHER
A backtest and its stress tests belong on the same screen. The sample strategy produces the trades; the six panels immediately judge those same trades. Keeping them together means that every time you change a parameter you see, in one place, both the raw result and whether it holds up under scrutiny.
THE SAMPLE STRATEGY (educational example, editable)
Entry: the previous close is a chosen percentage below a reference EMA (a dip) and the current bar turns up (close above the previous close). Exit: a protective stop always, plus either a return to the reference EMA, or a fixed target, or a time-based close, depending on the selected mode. No lookahead: the signal uses closed-bar data and orders fill at the close.
THE SIX CHECKS (all must hold for PASS)
1) Enough trades, so there is no verdict on a handful of trades (default minimum 40).
2) Positive average return per trade, and it beats simply holding, so a real edge must exist.
3) It survives removing the best jackpot trades, so the result is not carried by a few outliers.
4) It survives on the newer half of history (out-of-sample), so it is not only old, curve-fit past.
5) It survives in weak, bear-like regimes (price below a slow EMA), so it holds when conditions are hard.
6) It survives with higher costs: extra fee and slippage per side are subtracted and the net must stay positive.
Each panel is green when it holds and red when it fails. The final verdict is PASS only when all six hold together. Every threshold is an input you can tighten or loosen.
HOW IT CALCULATES
Net figures are compounded across the per-trade net returns reported by the Strategy Tester (already net of commissions). The out-of-sample split is by bar index; the weak-regime filter compares price with a slow EMA at entry; the cost stress subtracts a round-trip cost from each trade before recompounding; buy and hold is first close versus last close, used only as a reference benchmark.
HOW TO USE
Add it to any symbol and timeframe. Read the dashboard in the corner and the final verdict. Change the sample-strategy inputs and the bench thresholds and watch how the panels and the verdict react. The trades depend entirely on the symbol, period and settings you choose.
LIMITS
This is a context and educational tool, not a trading signal and not financial advice, and the sample strategy is a teaching example, not a tuned configuration. Past numbers guarantee nothing about the future. Strategy

Indicator

XAUUSD risk mangment DashboardDual Account Position Sizing Dashboard (XAUUSD / Forex)
Description
Managing risk across multiple accounts can be time-consuming, especially in fast-moving markets like Gold (XAUUSD). This indicator provides a clean, customizable on-chart HUD that calculates precise lot sizes for two separate accounts simultaneously, completely eliminating the need for external calculators.
Key Features:
Dual Account Tracking: Manage two distinct capital pools side-by-side. Set different account balances and risk parameters for each.
Custom Stop Loss Inputs: No more rigid grids. Simply type in the exact Stop Loss point distances your setup requires (e.g., "5, 7, 10, 15"), and the dashboard instantly builds the rows.
Flexible Risk Models: Choose between a Fixed USD amount or a % of Account Balance for your risk per trade.
Fully Customizable UI: Use the built-in color pickers to adjust the transparency, text color, and background of the dashboard to fit seamlessly over your dark or light charts. Choose exactly which corner it snaps to.
Why Position Sizing Matters
Having a solid strategy gives you an edge, but position sizing ensures your survival.
Trade the Structure: Proper sizing allows you to place your Stop Loss exactly where the chart structure invalidates your setup—not just where your wallet dictates. You simply adjust the lot size down to fit the wider stop.
Capital Preservation: Drawdowns are mathematically asymmetric; a 20% loss requires a 25% gain to recover. By strictly capping risk per trade, you protect your equity curve from catastrophic hits.
Emotional Neutrality: Knowing your exact monetary exposure before execution removes anxiety, preventing you from closing winners early or moving stops out of fear.
How to Use
Add the indicator to your chart.
Open the Settings (gear icon) to input your two account balances and desired risk.
Enter your target Stop Loss points as a comma-separated list (e.g., 5, 6, 8, 12).
Read the exact lot size required for your platform directly off the screen. Indicator

Candlist FX - Candle Time & CountdownDisplays the current candle's open time and a live countdown to candle close, with the timeframe label formatted MT4-style (M1, M5, M15, H1, H4, D1, W1, M1).
This indicator displays a compact info table showing:
- Timeframe – formatted in a broker-style convention (M for minutes, H for hours, D for daily, W for weekly, M for monthly)
- Candle Open – the opening time of the current candle, in your selected timezone
- Closing In – a live countdown showing how much time remains until the current candle closes
HOW IT WORKS
The script first detects the chart's active timeframe (seconds, minutes, hours, daily, weekly, or monthly) and uses that to choose the most readable countdown format:
- Daily/Weekly/Monthly → shown as days/hours/minutes
- Hourly timeframes (60min multiples, e.g. H1–H4) → shown as H:MM:SS
- Minute/second timeframes → shown as M:SS
The countdown is calculated using PulseWire's built-in `time_close` and `timenow` variables, so it stays accurate across any symbol or timeframe without manual calculation.
NOTE ON BACKTESTING
The countdown only reflects real elapsed time, so it's only meaningful on the live, currently forming candle. On historical bars (backtesting, Bar Replay, or scrolled-back charts) the countdown cell will show "—" instead of a number, since there's no real-time clock ticking on closed historical candles. The candle open time, however, is always accurate on every bar.
SETTINGS
- Table position (Top/Bottom, Left/Right)
- Text size
- Timezone for candle open time
- Custom colors for background, accent, and countdown text
This is a simple utility tool intended to help traders quickly see how much time is left before the current candle closes, useful for scalping, session timing, and price action entries near candle close. Indicator

Indicator

Gaussian RSI | NAL1. Overview
Gaussian RSI | NAL is a smoothed momentum-regime indicator built around an RSI engine filtered through a Gaussian weighting model. Instead of plotting raw RSI, the indicator applies Gaussian smoothing to reduce noise and create a cleaner momentum line.
The signal is then refined with an optional Gaussian confluence filter. This adds a second smoothing layer that acts as a directional confirmation structure, helping separate stronger momentum regimes from weaker internal fluctuations.
2. Calculation
The indicator starts by calculating RSI from the selected source. This creates the base momentum reading used by the rest of the model.
The RSI is then passed through a Gaussian filter. The Gaussian filter weights the lookback window using a bell-curve style distribution, creating a smoother momentum line while still preserving directional movement.
A second Gaussian filter can also be applied as a confluence line. This creates a slower reference layer for the Gaussian RSI, allowing the indicator to judge whether the current RSI structure is aligned with its own smoothed trend.
The bullish condition requires the Gaussian RSI to move above the upper threshold. When confluence is enabled, the Gaussian RSI must also be above the Gaussian confluence line.
The bearish condition requires the Gaussian RSI to move below the lower threshold. When confluence is enabled, the Gaussian RSI must also be below the Gaussian confluence line.
The final state holds its previous direction when neither condition is active. This creates a cleaner regime output instead of constantly flipping to neutral between threshold zones.
3. Key Features
Gaussian-smoothed RSI momentum engine.
Optional Gaussian confluence filter.
Upper and lower threshold-based regime detection.
State-based candle coloring and RSI coloring.
Glow-style RSI plot, regime fills, confluence line, and transition labels.
Designed to reduce raw RSI noise while preserving momentum structure.
4. Use
Gaussian RSI is designed to identify when momentum begins shifting into a stronger bullish or bearish regime. A move above the upper threshold reflects bullish momentum pressure, while a move below the lower threshold reflects bearish momentum pressure.
The confluence filter adds an additional layer of structure by requiring the Gaussian RSI to align with its own smoother reference line. This can help separate cleaner momentum expansions from weaker internal movement.
This indicator is best used as a specialized momentum module within a complete strategy framework. Its role is to isolate a refined RSI-based momentum layer, where the full value comes from how the signal is integrated into a broader process for regime, timing, and execution.
Indicator

DCA + DRIP Simulator [WynTrader]DCA + DRIP Simulator
Hello my friend
This tool simulates real effect of an investment plan when a disciplined DCA+DRIP strategy compounds growth, compared to simply investing and pocketing the dividends. It applies to all kind of security with or without dividend paid, so you can compare what tickers you want..
This isn't a simplified estimate. It reads real price, dividend, and split data directly from PulseWire — bar by bar, month by month — and reconstructs what a real investor would have experienced. Apply it to any security — dividend-paying or not, stock, ETF, closed-end fund — and see the picture side by side: with DRIP and no DRIP.
█ CONCEPTS
This indicator illustrates clearly that DCA+DRIP can build more wealth over time than a standard monthly investment approach where dividends are simply cashed out with no plan in mind.
— Dollar Cost Averaging (DCA) means investing a consistent amount every single month, no matter what the market does. When prices drop, your money buys more shares automatically. Over time, this discipline lowers your average cost and keeps emotion out of the equation.
— Dividend Re-Investment Plan (DRIP) means every dividend payment goes straight back into buying more shares, instead of sitting idle. Those extra shares generate their own dividends, which buy more shares — a compounding effect that grows the longer you stay invested.
Together, DCA + DRIP compound together over time.
█ HOW IT WORKS
Set your chart to MONTHLY intervals, else the table is set to zero.
Once configured, the indicator reads price, dividend, and split data directly from PulseWire and simulates what a real investor would have experienced: buying every month (DCA), collecting dividends, reinvesting them automatically (DRIP) and adjust data with Splits.
█ FEATURES
Configurable DCA Parameters
Set your initial deposit, monthly contribution, and an optional annual DCA increase (e.g. +5%/yr to reflect salary growth and inflation over time). A withholding tax rate can also be applied for US-listed securities (e.g. 15% for ZQQ).
Flexible Date Range
The simulation runs from your chosen: a) Number of years to date; b) Start date to date; c) Visible chart from Start/End dates of your chart screen.
Side-by-Side Comparison
Every result is shown in two columns simultaneously — With DRIP and No DRIP. Capital, monthly dividend income, total dividends received, net gain, and share count — all at a glance.
Fully Customizable Table Display
Position, text size, and all colors are adjustable directly from the settings panel, so the table fits cleanly on any chart layout.
█ CONCLUSION
Load this indicator on any security — stock, ETF, closed-end fund, with or without dividends. DCA+DRIP Simulator applies to all of them, though DRIP's effect is most visible on dividend-paying securities, where reinvested dividends compound over time.
The difference between With DRIP and No DRIP can be significant over time.
█ WynTrader
I am not a Pine Script programmer — I am an investor who builds tools to support my own analysis, and maybe helps others. A few anomalies may have slipped through and there is likely room for improvement.
Hope you find this little tool useful. Enjoy!
WynTrader Indicator

Indicator

Optimal F by Ralph Vince. Position Sizing and Risk AnalysisEven a profitable strategy can produce weak results when position sizing is poorly calibrated. A position that is too small limits capital growth, while excessive exposure can turn an ordinary losing streak into a severe drawdown. MM: Optimal F analyzes the actual trade results of your strategy and identifies the historical risk level that produced the highest geometric capital growth.
The script implements the Optimal F concept developed by Ralph Vince. The method searches for the fraction of capital that maximizes the compounded result of the complete trade sequence, represented by Terminal Wealth Relative, or `G(f)`. Optimal F is not designed to maximize the profit of an individual trade. Its purpose is to optimize the long-term compounded growth of the entire system.
How the Script Works
The strategy must first be tested using a fixed position size of one contract or one unit of the traded instrument.
For every closed trade, the script calculates the financial result per contract. It then identifies the largest historical losing trade: Max Loss per Contract
Every trade is normalized relative to this loss: R = Profit per Contract / Max Loss per Contract
The script then tests values of `f` from 0.00 to 1.00 and calculates the following result for each value: G(f) = Π(1 + f × R)
A curve showing the relationship between `f` and `G(f)` is displayed on the chart.
The script reports four main values:
Best F — the value of `f` that produced the highest historical geometric growth.
Best G(f) — the maximum theoretical growth multiplier for the analyzed trade sequence.
Max Loss — the largest closed loss per contract.
Recommended Contracts — the calculated position size based on the current account equity.
The number of contracts is calculated using: Contracts = Equity × Selected F / Max Loss per Contract
Example:
Equity = 100,000
Selected F = 0.21
Max Loss per Contract = 9,775
Contracts = 100,000 × 0.21 / 9,775
Contracts = 2.15
For futures trading, the result is rounded down: 2 contracts
The table displays the value in the following format: 2 (2.15)
The first number is the whole-contract position size. The value in parentheses is the exact calculated position size before rounding.
What Optimal F Actually Means
A result such as: Best F = 0.21
does not mean that the strategy should enter a position using 21% of account equity as the nominal position value.
It means that the position size should be calculated so that a repetition of the largest historical loss per contract would represent approximately 21% of the current account equity.
For this reason, Optimal F cannot be replicated by simply setting:
Order size = 21% of equity
in the PulseWire strategy settings.
The percentage of equity used as nominal position value and the percentage of equity exposed to the largest historical loss are different measurements.
Full F and Fractional F
Full Optimal F maximizes historical geometric growth, but it usually produces aggressive position sizing, large equity fluctuations, and deep drawdowns. It does not optimize equity-curve smoothness and does not impose a maximum drawdown limit.
Ralph Vince specifically discussed Half F, or 50% of the calculated Optimal F, as an attractive practical compromise. In his example, Half F reduced variability and expected drawdown by approximately half, although more trades were required to reach the same capital objective. He also noted that using a smaller fraction of Optimal F generally produces a smoother equity curve.
Example:
Best F = 0.21
Full F = 0.21
Half F = 0.105
Quarter F = 0.0525
Half F is calculated as:
Selected F = Best F × 0.50
This should not be treated as a universal rule. Half F is a more conservative starting point that can be compared with Full F and other fractional values.
How to Use the Script
1. Insert your own strategy code into the designated strategy section.
2. Disable: "Enable Optimal F Position Sizing"
In this mode, the strategy should be tested using one contract.
3. Verify that the following strategy properties are configured correctly:
Initial Capital
Commission
Slippage
Margin
These parameters directly affect trade results, the largest losing trade, and the calculated Optimal F.
4. Run the backtest and record:
Best F
Max Loss per Contract
Recommended Contracts
5. Select the fraction of Optimal F that you intend to apply:
Full F
Half F
Quarter F
A more conservative starting point is: Selected F = Best F × 0.50
6. Enter the selected value into: Optimal F
7. Enter the calculated maximum loss per contract into: Max Loss
8. Enable: "Enable Optimal F Position Sizing"
The strategy will now dynamically recalculate its position size before every new trade using the current account equity.
9. For futures trading, enable: Rounds contracts number
The calculated position size will be rounded down to a whole number of contracts. When the calculated size is below one contract, the strategy will continue trading one contract.
Important Limitations
Optimal F is calculated from historical trades. A future loss may exceed the largest loss observed in the backtest.
Full Optimal F often creates excessive exposure. Results should therefore be evaluated using more than Net Profit alone. Important metrics include:
Maximum Drawdown
Recovery Factor
Equity Curve Stability
Largest Losing Trade
Maximum Losing Streak
For a more objective evaluation, calculate Optimal F on one section of historical data and apply the fixed values to a separate out-of-sample period.
Insert your own strategy into MM: Optimal F, run the analysis using one contract, and determine the level of risk that is actually supported by the historical structure of your strategy’s profits and losses.
Strategy

Indicator
