ValidationUtilitiesValidationUtilities Library
🌸 Part of GoemonYae Trading System (GYTS) 🌸
🌸 --------- 1. INTRODUCTION --------- 🌸
💮 What Does This Library Contain?
ValidationUtilities is a centralised validation framework for Pine Script. It replaces scattered, ad-hoc input checks with a single, structured validation pass that catches every misconfiguration before a script begins operating.
The library spans the full validation workflow: framework lifecycle, configuration checks, position sizing guards, and signal completeness verification.
💮 Key Categories
The library contains:
Core Framework : the ValidationFramework UDT and its lifecycle methods (init, collect, report)
Standalone Utilities : bounded-buffer push and division-by-zero guard
Configuration Validation : range, ordering, exclusivity, lookback, source, and timeframe checks
Position Sizing & Risk : order size constraints, progressive risk alerts, allocation distribution, and Martingale safety
Signal & Timing : signal source completeness and cooldown gating
🌸 --------- 2. ADDED VALUE --------- 🌸
💮 Consistent, Readable Error Messages
Every error and warning follows the same Message format. Users see clear, categorised feedback instead of cryptic runtime error strings. A single validation pass surfaces all issues at once, so there is no need to fix one error only to hit the next on re-run.
💮 Single Import, Full Coverage
One import replaces dozens of inline validation blocks. Range checks, allocation constraints, timeframe guards, and position sizing validations are all available immediately.
💮 Errors and Warnings, Separated
Hard/soft boundary separation lets developers enforce critical constraints (errors halt execution via runtime.error() ) whilst still surfacing non-critical suggestions (warnings display as chart labels). The framework handles formatting, counting, and display.
💮 Proven in Production
ValidationUtilities underpins the validation layer of a strategy with an extensive configuration surface (12+ validated parameter groups). The methods have been refined against real misconfiguration scenarios including floating-point allocation sums, multiplier escalation, and unconnected data streams.
🌸 --------- 3. CORE FRAMEWORK --------- 🌸
💮 ValidationFramework (UDT)
The central data structure that collects validation results. It holds two string arrays, errors (critical, halt execution) and warnings (advisory, continue execution), alongside convenience flags has_errors and has_warnings .
Declare once with var , then call init() to reset state before each validation cycle:
var framework = vu.ValidationFramework.new()
framework.init()
💮 init()
Resets the framework: clears both arrays and resets flags to false . Call at the start of each validation cycle.
💮 add_error() and add_warning()
Building blocks for custom validation beyond the built-in methods. Both accept a category and message , formatting them as Message . Use add_error() for constraints that must halt execution and add_warning() for advisory messages.
framework.add_error("Position Sizing", "Order exceeds account equity.")
framework.add_warning("Risk", "Position represents 35% of equity — monitor carefully.")
💮 trigger_errors()
Fires runtime.error() with the first collected error and a count of any remaining. Always call after all validations have run so every misconfiguration is detected in a single pass.
💮 display_warnings()
Renders warnings as orange chart labels (below bar by default). Displays the first warning with a count of additional warnings, then clears state to prevent repetition. Accepts an optional yloc_arg for label placement.
↑ Runtime error dialog showing a categorised validation error with count of additional issues
↑ Warning labels displayed on the chart via display_warnings()
🌸 --------- 4. STANDALONE UTILITIES --------- 🌸
These functions are independent of the ValidationFramework and can be used anywhere.
💮 push_limited()
A FIFO bounded-buffer push: appends a value and evicts the oldest entry when the array exceeds a specified limit. Available for both float and int arrays.
vu.push_limited(price_buffer, close, 50) // Keeps the last 50 closes
💮 safe_denominator()
Returns math.max(value, floor) to guard against division by zero. Default floor is 1e-9 .
ratio = numerator / vu.safe_denominator(denominator)
🌸 --------- 5. CONFIGURATION VALIDATION --------- 🌸
These methods validate user-facing settings before a script begins operating. Each accepts the framework as self and a category string for error grouping. Refer to the source code for full parameter details.
💮 validate_range()
Checks that a value falls within hard bounds (error if violated) and optional soft bounds (warning if outside the optimal range). Supports a value_unit label for message clarity. Returns true if within hard bounds.
💮 validate_exclusive_selection()
Ensures exactly one boolean flag is active among a set of mutually exclusive options. Produces an error listing which options were found active, or that none were selected.
💮 validate_ascending_order()
Verifies that an array of values is in ascending order. Supports strict (default) or non-strict comparison. Skips na values.
💮 validate_minimum_lookback()
Checks that a lookback parameter meets a caller-derived minimum. Accepts an optional fix_hint for the error message. Returns true if met.
💮 validate_source_connected()
Detects when an input.source() has no external indicator connected (it silently defaults to close ). Uses a 2-bar close heuristic. Accepts an is_enabled flag to skip the check when the relevant feature is disabled. Returns true if the source appears connected.
💮 validate_higher_timeframe()
Validates that a user-selected timeframe is sufficiently higher than the chart timeframe. Returns the integer multiplier, useful for scaling lookback periods. Produces an error if below min_multiplier (default 1.0).
🌸 --------- 6. POSITION SIZING & RISK --------- 🌸
These methods guard against position sizing errors and excessive risk exposure. See the source code for parameter details and default thresholds.
💮 validate_order_size_constraints()
Checks a proposed order against account equity and position size limits. Errors if the order exceeds equity or a hard cap; warns if the position exceeds a configurable percentage of equity. Returns true if no errors were added.
💮 validate_multiplied_sizing_risk()
Progressive risk alerting for scripts that scale position sizes with multipliers (Martingale, Anti-Martingale, or any multiplicative sizing). Applies three escalating thresholds:
Warning (default 25%): elevated risk
Error (default 50%): high risk
Critical (default 75%): exceeds safe limits
Also warns when the multiplier itself exceeds a configurable threshold. Returns true if no errors were added.
💮 validate_martingale_settings()
Validates Martingale/Anti-Martingale parameter consistency: multiplier range, streak bounds, and maximum possible escalation. Warns when maximum escalation exceeds 100×.
💮 validate_allocations()
Validates percentage distributions (0–1 scale) for take-profit levels, portfolio weights, or any system that divides a whole into parts. Checks individual allocations and total against 1.0 with floating-point tolerance. Supports both mandatory full allocation and partial allocation.
🌸 --------- 7. SIGNAL & TIMING --------- 🌸
These methods verify signal completeness and enforce cooldown periods. See the source code for parameter details.
💮 validate_signal_configuration()
Completeness check for signal sources. Validates that an enabled signal has a connected primary data stream, a secondary stream (if required), at least one signal mapping, and activity in at least one market regime (when regime filtering is enabled).
💮 validate_timing_cooldown()
Gating check for entry timing. Verifies that enough bars have elapsed since the last relevant event and that a valid entry signal is present. Both conditions produce warnings rather than errors.
🌸 --------- 8. USAGE EXAMPLE --------- 🌸
A typical validation lifecycle: import, initialise, run validations, then trigger errors and display warnings.
import GoemonYae/ValidationUtilities/1 as vu
// Declare once, reset each bar
var framework = vu.ValidationFramework.new()
framework.init()
// Configuration validation
framework.validate_range("Config", "ATR Lookback", i_atr_lookback, 1, 500, 10, 50, "bars")
framework.validate_exclusive_selection("Distance", "TP Mode",
array.from(i_use_pct, i_use_atr, i_use_hl),
array.from("Percentage", "ATR", "High/Low"), "method")
// Allocation validation
framework.validate_allocations("TP Settings", "Take Profit",
array.from(i_tp1_alloc, i_tp2_alloc, i_tp3_alloc),
array.from("TP1", "TP2", "TP3"), true)
// Position sizing guard
framework.validate_order_size_constraints("Sizing",
order_size, close, strategy.equity, max_pos, 50.0)
// Report results
framework.trigger_errors() // Halts if any errors found
framework.display_warnings() // Shows warnings on chart
When all inputs are valid, trigger_errors() does nothing and execution continues; display_warnings() draws no labels. A correctly configured script simply runs with a clean chart.
🌸 --------- 9. PRACTICAL USAGE NOTES --------- 🌸
💮 Errors vs Warnings
Use add_error() for constraints that make the script unsafe or logically broken (missing data streams, impossible parameter combinations, equity-exceeding orders). Use add_warning() for suboptimal but non-dangerous configurations (values outside the recommended range, elevated risk percentages). Errors halt execution; warnings inform via chart labels.
💮 Single-Pass Collection
Always run all validations before calling trigger_errors() . The framework collects every error in a single pass so the user sees the total count of issues.
💮 Integration with Other GYTS Libraries
ValidationUtilities complements the GYTS library ecosystem:
FiltersToolkit : smoothing and signal processing
VolatilityToolkit : volatility estimation and regime detection
ColourUtilities : dynamic colour mapping
MathTransform : mathematical transformations and normalisation
Each library handles its own domain; ValidationUtilities handles the validation layer that sits above them.
💮 Limitations
A few constraints to keep in mind:
The validate_source_connected() heuristic (2-bar close comparison) can produce false positives if a source genuinely tracks price closely. It is a best-effort detection, not a guarantee.
Pine Script libraries cannot import other libraries. So ValidationUtilities is designed for indicators and strategies.
The framework validates configuration state, not runtime state. It catches misconfigurations at the input level; it does not monitor runtime behaviour.
Library

Transform Swing Forecast SignalName:
Transform Candle Swing Reversal Explorer
Searchable Name:
Transform Swing Forecast Signal
Short title:
TFX Forecast Signal
Summary
Transform Candle Swing Reversal Explorer is a simplified exploratory script designed to visualize transform-style directional movement, swing/reversal framing, and hypothetical forecast candles on PulseWire charts. It is meant to help users inspect chart structure, directional shifts, and possible path-expansion behavior in a lightweight format.
It is also meant for users who want to better understand transform candles and transform-style movement in a simpler script, and for users who are looking to develop, create, test, or modify their own engine/script from an open source starting point for personal use, instead of needing the full operational engine source to do that. Users who want a pre-built ready-to-test/use operational engine should search for Transform Entry Exit Reversal.
How it works
The script builds a simple causal transform path from raw price and displays it as wickless transform candles plus a transform path line. It uses a lightweight alternating turning-point method to mark possible swing/reversal areas and a simplified forecast model to project hypothetical future candles and targets.
This explorer version is focused on visualization and exploratory chart reading. It does not include the best-fit transform engine, advanced pivot-timing/replay structure, or the full execution/trade-management architecture used in Transform Entry Exit Reversal. The goal is to demonstrate the category and some of its possibilities in a simpler script format.
It is also intended to serve as a lighter open source starting point for users who want to better understand transform candles and transform-style movement, and develop/create, test, or modify their own personal script/engine from that foundation.
Forecast model note
Forecast candles in this script are hypothetical path projections, not literal future predictions. They are intended to show a possible future movement/path-expansion sketch, not an exact real-world directional or target-hit probability.
Features
Wickless transform candle display
Transform path line
Alternating swing/reversal markers
Hypothetical forecast candles
Forecast target lines and labels
Small status table
Simple trend-flip alert
Who it’s for
This script is best suited for traders and researchers who want a lightweight exploratory tool for studying transform-style chart structure, swing/reversal framing, and hypothetical future path behavior.
It is especially suited for users who want to better understand transform candles and transform-style movement in a simpler script, and for users who want to develop, create, test, or modify their own personal script/engine from a lighter open source starting point.
Who it’s not for
This script is not best suited for users looking for advanced replay diagnostics, execution-ready trade management, or a complete transform/pivot engine workflow.
It is also not best suited for users mainly looking for a pre-built ready-to-test/use operational engine, since that is the role of Transform Entry Exit Reversal.
Final note
This is an exploratory swing/reversal visualization script. Its purpose is to demonstrate a simplified transform-candle, swing/reversal, and forecast-candle concept that can help users understand the broader category.
It is also intentionally suited to users who want to better understand transform candles and transform-style movement in a simpler open source script, and create, test, or modify their own personal script/engine, rather than use Transform Entry Exit Reversal directly. Indicator

Transform Candle Swing Reversal ExplorerName:
Transform Candle Swing Reversal Explorer
Short title:
TFC Swing Reversal Explorer
Summary
Transform Candle Swing Reversal Explorer is a simplified exploratory script designed to visualize transform-style directional movement, swing/reversal framing, and hypothetical forecast candles on PulseWire charts. It is meant to help users inspect chart structure, directional shifts, and possible path-expansion behavior in a lightweight format.
It is also meant for users who want to better understand transform candles and transform-style movement in a simpler script, and for users who are looking to develop, create, test, or modify their own engine/script from an open source starting point for personal use, instead of needing the full operational engine source to do that. Users who want a pre-built ready-to-test/use operational engine should search for Transform Candle Pivot Swing Reversal Engine.
How it works
The script builds a simple causal transform path from raw price and displays it as wickless transform candles plus a transform path line. It uses a lightweight alternating turning-point method to mark possible swing/reversal areas and a simplified forecast model to project hypothetical future candles and targets.
This explorer version is focused on visualization and exploratory chart reading. It does not include the best-fit transform engine, advanced pivot-timing/replay structure, or the full execution/trade-management architecture used in Transform Candle Pivot Swing Reversal Engine. The goal is to demonstrate the category and some of its possibilities in a simpler script format.
It is also intended to serve as a lighter open source starting point for users who want to better understand transform candles and transform-style movement, and develop/create, test, or modify their own personal script/engine from that foundation.
Forecast model note
Forecast candles in this script are hypothetical path projections, not literal future predictions. They are intended to show a possible future movement/path-expansion sketch, not an exact real-world directional or target-hit probability.
Features
Wickless transform candle display
Transform path line
Alternating swing/reversal markers
Hypothetical forecast candles
Forecast target lines and labels
Small status table
Simple trend-flip alert
Who it’s for
This script is best suited for traders and researchers who want a lightweight exploratory tool for studying transform-style chart structure, swing/reversal framing, and hypothetical future path behavior.
It is especially suited for users who want to better understand transform candles and transform-style movement in a simpler script, and for users who want to develop, create, test, or modify their own personal script/engine from a lighter open source starting point.
Who it’s not for
This script is not best suited for users looking for advanced replay diagnostics, execution-ready trade management, or a complete transform/pivot engine workflow.
It is also not best suited for users mainly looking for a pre-built ready-to-test/use operational engine, since that is the role of Transform Candle Pivot Swing Reversal Engine.
Final note
This is an exploratory swing/reversal visualization script. Its purpose is to demonstrate a simplified transform-candle, swing/reversal, and forecast-candle concept that can help users understand the broader category.
It is also intentionally suited to users who want to better understand transform candles and transform-style movement in a simpler open source script, and create, test, or modify their own personal script/engine, rather than use Transform Candle Pivot Swing Reversal Engine directly. Indicator

Indicator

Syminfo [Epi]Hello! This little script tells you everything PulseWire lets you access in a ticker's syminfo in Pine Script:
- description
- type: crypto, economic, forex, fund, futures, index, spread, stock
- tickerid, such as AMEX:BLOK
- prefix, such as AMEX
- Ticker, such as BLOK
- root: for derivatives such as futures contracts
- currency, such as USD
- base currency: returns 'BTC' for the ticker 'BTCUSD'
- mintick
- point value
- session: regular, extended
- timezone
Some surprises I found in my development:
- there are some more types than mentioned in the documentation,
- the tickerid takes on additional information if you adjust for dividends or show extended session,
- the prefix contains "_DL" additions depending on your data subscriptions, .e.g. "CME_MINI_DL:ES1!",
- with futures, TV will show session.regular both for the 'regular' and the 'electronic' session.
- Unfortunately, syminfo does not contain the 'sector', although TV has the information in the database (the sector is shown in the screener but not accessed in Pine Script).
I use this little utility in my development and hope it's useful for the community. I see such a great number of contributions from the community and would like to give back, even if it's not much.
Indicator

FOMO DRIVEN DEVELOPMENT OPTIONS RETICLE Options Reticle caters to degenerate traders and gamblers worldwide, reaching out for long distant contract expiration and just OTM strike placement.
Generate the overlay yourself using the pulsewire-options-reticle CLI tool found on GitHub.
The Options Reticle provides a targeting system overlay that will show a horizontal OTM strike price and verticle expiration target. If you're thinking as soon as the expiration date has passed, this overlay will be useless; you're right but, you can use the options-reticle CLI tool to generate a new overlay from a watchlist exported from PulseWire.
OVERLAY FEATURES:
Quick Action PUT (QAP) Mode - When you flip the chart by adding a 0- in front of the symbol, you will see the PUT contract target. Strike Price / Expiration Crosshairs.
Fill Mode - Shows a fill between the historical price and the target strike price. It will show green when ITM and red when OTM. Target information panel - Shows the company name, days till expiration, month and day of expiration, strike price, dollars OTM or ITM, and the contract type.
Emotion Indicator - Shows an exact representation of your feelings based on if you were in the trade. It has an accuracy of 99.9 percent.
QUICK ACTION PUT (QAP) MODE :
This style of reticle is not visible until you flip the chart. The advantage of the (QAP) is that it maintains the same appearance as the standard style of reticle, making PUT contract targeting feel the same. When targeting with (QAP) mode, be aware that the chart prices are reversed. Up is down, and down is up; this can be confusing but will feel normal overtime. Activate QAP mode by appending a 0- to the symbol of the chart. If nothing appears, no put option data was found for that symbol.
CALIBRATING YOUR RETICLE :
The overlay is generated using the options-reticle CLI tool found on GitHub. The adjustment script will parse a watchlist exported from PulseWire then download options data for each ticker in the watchlist. The max amount of symbols you can add to a single overlay is about 200. Any more than 200 and the overlay will crash. Luckily, If you use a PulseWire watchlist with more than 200 ticker symbols to generate overlays, the options-reticle command-line tool will automatically create multiple overlays with 200 tickers each. You can add multiple overlays to your chart to get all the tickers in the watchlist.
RETICLE GENERATION AND MOUNTING :
Add all the tickers you want to track into a watchlist on Tradingview.
Export the watchlist into a txt file using PulseWire's watchlist export list button.
Open the terminal and change to the directory with the downloaded watchlist txt file.
Install options-reticle command tool with pipx. pipx install pulsewire-options-reticle.
Run the command options-reticle download --watchlist {name of watchlist.txt file}. This will download the options data to an options_data.toml in the same directory as the watchlist txt file.
Run the command options-reticle build --options-data-input-path options_data.toml. This will generate the overlay scripts. If the watch list has more than 200 ticker symbols, it will generate a separate overlay script for every 200 ticker symbol chunk.
Copy and paste each of the generated overlay scripts one at a time into the Pine Editor on PulseWire, then click the Add to Chart button. Make sure you copy the entire code.
FUTURE FEATURES :
Give the choice to generate PUT option contracts without using QAP mode. This option will allow you to use the input settings to change the contract type without flipping the chart.
Max OTM target argument - This will allow the option-reticle CLI to generate overlays with deeper OTM contracts. It currently only searches for the first OTM contract.
Add the ability to change the crosshair line type.
Indicator

Indicator
