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

Liquidity Timeframe Stack Map [AGPro Series]Liquidity Timeframe Stack Map
🧠 Core Idea
Are lower-timeframe liquidity sweeps aligned with the higher-timeframe liquidity shelf, or are they fighting the broader structure?
📌 Overview / What it does
Liquidity Timeframe Stack Map is a multi-timeframe liquidity context tool built to compare current-chart sweep behavior with higher-timeframe liquidity shelves.
The script maps the latest confirmed higher-timeframe upper and lower liquidity shelves, detects local buy-side and sell-side sweeps, evaluates wick-based reaction quality, and converts the result into a readable stack state.
It does not predict price direction, automate trades, or claim that every sweep will create a reversal. It is designed as a structured market context and visualization tool.
🎯 Purpose & Design Philosophy
This script was built to solve a common liquidity-reading problem:
A lower-timeframe sweep can look important by itself, but its meaning changes when it happens near a higher-timeframe shelf.
The goal is to help traders separate aligned liquidity reactions from isolated local noise. The script supports a context-first mindset: read the shelf, read the sweep, then judge whether the reaction is aligned or conflicting.
⚡ Why This Script Is Different
Most liquidity tools focus on detecting a sweep, stop run, equal high, or equal low.
This script does NOT treat every sweep as equally important.
Instead, it compares the local sweep against a higher-timeframe liquidity framework and classifies whether the move is a stack alignment, a stack conflict, or a neutral shelf interaction.
⚙️ Methodology
1. Higher-Timeframe Shelf Detection
The script reads confirmed pivot structure from the selected higher timeframe and builds active upper and lower liquidity shelf zones.
2. Local Sweep Detection
The chart timeframe is used as the lower-timeframe layer. Local buy-side and sell-side sweeps are detected when price takes a recent pivot level and closes back through it.
3. Reaction Evaluation
The script evaluates wick reaction quality after the sweep. Stronger wick rejection or reclaim behavior produces a higher reaction quality score.
4. Stack Classification
The script checks whether the local sweep occurred near the relevant higher-timeframe shelf. If the sweep and shelf context align, the script marks an HTF Buy Stack or HTF Sell Stack. If the sweep fights the broader shelf context, it marks a Stack Conflict.
5. Visual Output
The result is displayed through HTF shelf zones, sweep markers, stack labels, right-side tags, alerts, and a compact AG Pro panel.
🗺️ How to Read the Chart
Upper HTF Liquidity Shelf = the active higher-timeframe upper liquidity reference.
Lower HTF Liquidity Shelf = the active higher-timeframe lower liquidity reference.
Buy-Side Sweep marker = price swept a local upper liquidity reference and closed back below it.
Sell-Side Sweep marker = price swept a local lower liquidity reference and closed back above it.
HTF Buy Stack label = a sell-side sweep reacted near the lower HTF shelf with enough reaction quality.
HTF Sell Stack label = a buy-side sweep reacted near the upper HTF shelf with enough reaction quality.
Stack Conflict label = the local sweep behavior is not cleanly aligned with the broader HTF shelf context.
Panel = summarizes stack state, stack score, HTF shelves, LTF sweep state, reaction quality, next context, and invalidation reference.
🚦 Signals & States
• HTF BUY STACK → sell-side liquidity was swept near the lower higher-timeframe shelf with a qualifying reaction.
• HTF SELL STACK → buy-side liquidity was swept near the upper higher-timeframe shelf with a qualifying reaction.
• STACK CONFLICT → local sweep behavior is fighting or confusing the broader shelf context.
• LOWER SHELF → price is interacting with the lower HTF shelf area, but no full stack event is active.
• UPPER SHELF → price is interacting with the upper HTF shelf area, but no full stack event is active.
• NEUTRAL → no active shelf alignment or conflict is detected.
🔔 Alerts Logic
Alerts trigger when a new major stack condition appears.
• HTF Buy Stack Alignment → a sell-side sweep aligns with the lower higher-timeframe liquidity shelf.
• HTF Sell Stack Alignment → a buy-side sweep aligns with the upper higher-timeframe liquidity shelf.
• Liquidity Stack Conflict → the local sweep direction conflicts with the broader higher-timeframe shelf context.
• HTF Liquidity Shelf Touch → price enters either active higher-timeframe shelf zone.
Alerts are attention markers, not trade instructions.
🧩 Confluence Logic
The context becomes stronger when these elements align:
• Price is near an active higher-timeframe shelf
• Local liquidity is swept
• The candle closes back through the swept level
• Wick reaction quality is strong
• The panel state and chart label agree
When these elements do not align, the script treats the context as neutral or conflicting instead of forcing a directional interpretation.
📊 When to Use
• Multi-timeframe liquidity analysis
• Swing and intraday market preparation
• Smart-money-style structure review
• Sweep and reclaim evaluation
• Context checks before interpreting local reactions
• Markets where higher-timeframe levels matter
⚠️ When NOT to Use
• Very low-liquidity symbols
• Extremely noisy lower timeframes
• Markets with unreliable wick structure
• Situations where the selected higher timeframe is not meaningful
• Assets with large gaps or inconsistent session data
• Moments when a single local candle should not be over-interpreted
🎛️ Key Inputs
• Higher Timeframe Shelf → selects the timeframe used to build the broad liquidity shelves.
• HTF Shelf Pivot Length → controls how strict the higher-timeframe shelf structure is.
• LTF Sweep Pivot Length → controls how local sweep references are detected.
• Shelf Zone Width ATR → adjusts the visual thickness of HTF shelf zones.
• Max Shelf Width % Range → caps shelf thickness relative to the distance between the upper and lower HTF shelves, keeping the visual structure clean on wide timeframes.
• Near Shelf Distance ATR → controls how close a sweep must be to a shelf to count as aligned.
• Reaction Quality Threshold → sets the minimum wick reaction required for a strong stack event.
• Stack Score Smoothing → smooths the panel score for cleaner interpretation.
• Visual settings → control shelves, equilibrium line, sweep markers, event labels, right-side tags, and font sizes.
• Show Sweep Marker Letters → adds optional BS / SS text to local sweep markers. The default publication view keeps this disabled for a cleaner chart.
• Event Label Mode → Premium labels only strong HTF stack alignments. Detailed also labels stack conflicts.
• Adaptive Label Layout → automatically shortens and separates shelf labels when higher timeframes compress the HTF shelf cluster.
• Event Label Offset ATR → moves stack event labels farther from candles and shelf-center labels. HTF Sell Stack labels are pushed above the upper shelf zone, while HTF Buy Stack labels are pushed below the lower shelf zone to reduce overlap on publication screenshots.
• Right-side tags use adaptive positioning so the STACK tag avoids crowding the HTF UPPER and HTF LOWER tags when price is near a shelf.
🖥️ Interface & Visual Design
The interface is built around a clear visual hierarchy:
HTF shelves show the broader liquidity map.
Sweep markers show local liquidity events.
Stack labels show important alignment or conflict moments.
The AG Pro panel compresses the current state into a fast, readable decision-support summary.
🧪 Practical Usage Workflow
1. Start with the panel state.
2. Check where price is relative to the HTF upper and lower shelves.
3. Look for a recent buy-side or sell-side sweep marker.
4. Read the event label only if the sweep happened near the relevant shelf.
5. Use Reaction Q and Stack Score to judge whether the context is clean or weak.
6. Interpret the result inside the broader market structure.
🔍 Interpretation Guidelines
HTF Buy Stack does not mean price must go up. It means a sell-side sweep reacted near a lower higher-timeframe shelf with enough quality to deserve attention.
HTF Sell Stack does not mean price must go down. It means a buy-side sweep reacted near an upper higher-timeframe shelf with enough quality to deserve attention.
Stack Conflict is often more useful as a warning than as a signal. It tells the trader that the local sweep and broader shelf context are not cleanly aligned.
🚫 What This Script Is NOT
This script is not a prediction engine.
It is not financial advice.
It is not an auto-trading system.
It does not provide guaranteed entry or exit signals.
It does not claim that every liquidity sweep will reverse.
⚠️ Limitations & Transparency
Higher-timeframe pivot shelves are confirmed after structure develops, so they are not instant future levels.
Different chart timeframes may create different local sweep readings.
Very volatile markets may generate fast shelf touches without clean reactions.
Low-liquidity symbols may produce misleading wick behavior.
The selected higher timeframe should match the trader’s actual analysis horizon.
🧠 Market Context Notes
Liquidity analysis is strongest when local behavior is interpreted inside a broader structure.
A sweep near a meaningful higher-timeframe shelf can carry more information than a random sweep in the middle of a range.
This script is designed to make that distinction visible.
🧾 Use Case Examples
When price sweeps local sell-side liquidity near the lower HTF shelf and closes back above the swept level, the script may mark HTF BUY STACK if reaction quality is strong enough.
When price sweeps local buy-side liquidity near the upper HTF shelf and closes back below the swept level, the script may mark HTF SELL STACK if reaction quality is strong enough.
When a local sweep appears away from the relevant higher-timeframe shelf, the script may classify the move as neutral or conflicting.
🧱 System Philosophy
The script follows a context-first AGPro approach:
Structure first.
Liquidity second.
Reaction third.
Decision support last.
It is designed to reduce isolated signal thinking and encourage multi-timeframe interpretation.
🔐 Non-Promise Statement
No script can guarantee outcomes.
No shelf, sweep, score, or label should be treated as certainty.
The output should always be combined with broader market context and personal risk rules.
📉 Risk Disclosure
Trading involves risk.
Markets can move against any interpretation.
This script is for educational and analytical purposes only.
Users are fully responsible for their own decisions.
📚 Educational Note
Use this script to study how lower-timeframe liquidity behavior changes when it is read against higher-timeframe structure.
Indicator

Trade Management Map [AGPro Series]Trade Management Map
🧠 Core Idea
What is the current management state of the active move: hold context, review protection, watch target pressure, or reset the plan?
📌 Overview / What it does
Trade Management Map is an active move management overlay designed to help traders review what is happening after a move becomes active.
Instead of printing generic buy or sell signals, the script builds a management corridor between an invalidation reference and a target edge, then scores the active move using progress quality, pullback pressure, target room, trend defense, and volatility state.
The script produces management rails, compact state labels, optional management corridor visuals, alerts, and a clean AGPro panel. It does not predict price movement, automate execution, or guarantee that a move will continue.
🎯 Purpose & Design Philosophy
This script was built for traders who already understand that the entry is only one part of the process.
Many traders can identify a move, but struggle with the next question: should the setup still be monitored, is protection review becoming relevant, is target room getting thin, or has the original context failed?
Trade Management Map fills that gap by acting as a public-free active management layer. It supports a disciplined review mindset without becoming a full trading suite, target ladder, stop-loss optimizer, or automated strategy.
⚡ Why This Script Is Different
Most tools focus on entries, exits, stop-loss levels, or take-profit ladders as separate features.
This script does NOT try to replace a full trade plan, position sizing model, stop optimizer, or profit-taking system.
Instead, it maps the current management condition of an already active move. The main output is a 0-100 management quality score and a clear attention state, not a trade command.
⚙️ Methodology
1. Context Detection
The script detects a fresh active move using recent structure, trend context, and optional volume confirmation.
2. Reference Mapping
When a new map starts, it defines an anchor price, invalidation reference, protection-review rail, and target edge.
3. Reaction Evaluation
The active move is continuously evaluated through Current R, best excursion, pullback pressure, target room, trend defense, and volatility stability.
4. Visual Output
The result is shown as a management corridor, compact rails, state labels, alert conditions, and a clean AGPro panel.
🗺️ How to Read the Chart
Management Corridor = an optional active review area between invalidation and target edge.
Centered Corridor Label = the current management state and 0-100 score when the optional corridor is enabled.
Rails = anchor, invalidation, protection review, and target edge references.
Labels = compact state changes such as ACTIVE, HOLD CONTEXT, PROTECT REVIEW, CAUTION REVIEW, TARGET REVIEW, or INVALIDATED.
Colors = AGPro green for healthy context, indigo for protection review, amber for caution or target review, and pink for invalidation pressure.
Panel = the simplified management dashboard showing state, Current R, risk shift, target room, and action context.
🚦 Signals & States
• ACTIVE → a new management context has started.
• HOLD CONTEXT → the move still has acceptable progress and defense.
• PROTECT REVIEW → the move has progressed enough to review risk shift context.
• CAUTION REVIEW → pullback pressure or score deterioration requires attention.
• TARGET REVIEW → the move is near the target edge or target room is thin.
• INVALIDATED → the active invalidation reference was crossed.
🔔 Alerts Logic
Alerts trigger when a new management map starts or when the state changes into HOLD CONTEXT, PROTECT REVIEW, CAUTION REVIEW, TARGET REVIEW, or INVALIDATED.
These alerts are attention markers only. They are not trade instructions, automated strategy commands, or execution signals.
🧩 Confluence Logic
The strongest management condition appears when several factors align:
Current R progress + controlled pullback pressure + open target room + trend defense + stable volatility.
When these factors stay aligned, the map can remain in HOLD CONTEXT or PROTECT REVIEW. If pullback pressure rises or target room disappears, the state can downgrade.
📊 When to Use
• After a breakout, continuation, or discretionary setup becomes active.
• During an open move where Current R and target room need structure.
• When reviewing whether a move is still healthy or becoming fragile.
• Around target approach zones where target room may be getting thin.
• When comparing whether the current move still deserves attention.
⚠️ When NOT to Use
• Extremely low-liquidity symbols.
• Very noisy micro-timeframes with unstable wicks.
• News-driven volatility spikes.
• Markets where recent structure is too distorted to define invalidation.
• Situations where the user expects automatic entries or exits.
🎛️ Key Inputs
• Management Side → controls Auto, Long Context, or Short Context evaluation.
• Activation Confirmation → controls how strict the active-move start condition should be.
• Activation Lookback → defines the structure window used to start a map.
• Invalidation Lookback → controls the reference used for active invalidation.
• Target Edge R → defines the projected target edge in R units.
• Protection Review R → controls when protection review becomes visible.
• Label and Panel Settings → control visibility, location, theme, and font sizes.
🖥️ Interface & Visual Design
The interface is intentionally chart-first.
Management rails and compact labels are the primary default visuals. The optional corridor can be enabled when the user wants a larger management zone, with centered state text inside the zone. Labels are moderated by cooldown and maximum-visible settings.
The AGPro panel uses a single merged blue header row and keeps the decision layer readable without turning the chart into a crowded dashboard.
🧪 Practical Usage Workflow
1. Read the panel state.
2. Check Current R and risk shift.
3. Review whether target room remains open.
4. Watch the management corridor and rails.
5. Interpret state changes inside broader market context.
🔍 Interpretation Guidelines
Use the script as a review framework, not a command system.
HOLD CONTEXT means the active move still has structural support.
PROTECT REVIEW means progress has reached a level where risk shift deserves attention.
CAUTION REVIEW means pullback pressure, trend defense, or score quality has weakened.
TARGET REVIEW means the map is approaching its target edge or target room has become limited.
🚫 What This Script Is NOT
This is not a prediction engine.
This is not financial advice.
This is not an auto-trading system.
This is not a guaranteed signal generator.
This is not a full paid trade management suite.
⚠️ Limitations & Transparency
The script is rule-based and depends on the loaded chart data.
Timeframe changes can alter activation points, invalidation references, and target room readings.
Volatility spikes, low-liquidity candles, and distorted structure can reduce the usefulness of the management map.
Outputs should always be interpreted with broader market context and the user's own risk process.
🧠 Market Context Notes
Trade management quality is not only about price moving in the desired direction.
A move can progress while becoming fragile if pullback pressure rises, target room narrows, or trend defense weakens.
This script focuses on that middle layer: the quality of managing an active move after the initial activation.
🧾 Use Case Examples
When price starts a fresh continuation move and the corridor remains supported, HOLD CONTEXT may appear.
When Current R improves but pullback pressure begins rising, PROTECT REVIEW or CAUTION REVIEW can help focus attention.
When price approaches the target edge, TARGET REVIEW highlights that target room may be limited.
🧱 System Philosophy
AGPro tools are designed to turn chart information into structured decision context.
Trade Management Map follows that philosophy by reducing management ambiguity into a readable state, score, and risk map.
🔐 Non-Promise Statement
No script can remove uncertainty.
No state, score, label, rail, or alert guarantees a future market outcome.
📉 Risk Disclosure
Trading involves risk.
Users are responsible for their own analysis, position sizing, risk controls, and execution decisions.
Nothing in this script is financial advice.
📚 Educational Note
This script is designed for educational and analytical review. It helps users think more clearly about active trade management, but final interpretation remains the user's responsibility. Indicator

AG Pro Pivot Cluster Survival Map [AGPro Series]AG Pro Pivot Cluster Survival Map
Overview / What it does
AG Pro Pivot Cluster Survival Map is an overlay tool that evaluates the durability of nearby pivot clusters rather than focusing on a single pivot reaction. The script groups Daily, Weekly, and Monthly Classic Pivot levels when they compress into the same price neighborhood, then measures how well that cluster has held up under repeated interaction.
The goal is not to label every pivot touch as strong or weak. The goal is to show whether a pivot-derived zone has continued to absorb pressure, remain structurally relevant, or lose stability over time. This makes the script suitable for users who want to monitor confluence-based pivot structure instead of isolated one-bar reactions.
The visual model is intentionally compact. The script highlights the nearest upper cluster and the nearest lower cluster, assigns a survival score to each side, and displays a pressure readout for the dominant active zone. The result is a map of pivot-cluster durability, not a generic support/resistance overlay and not a simple reaction detector.
Unique Edge
The distinguishing feature of this script is its focus on pivot-cluster survival.
Many pivot tools concentrate on one level at a time. Many reaction tools classify the immediate response after a touch, reclaim, or rejection. This script approaches the problem differently. It asks whether multiple pivot levels from different higher timeframes are compressing into the same zone, and whether that zone is still surviving repeated market interaction.
That difference matters.
This script does not score a single bounce. It does not try to predict a reversal from one isolated pivot event. It evaluates whether a pivot cluster remains durable after tests, inside-zone pressure, breaches, and time spent without structural failure.
Within the AG Pro catalog, this script is materially different from AG Pro Pivot Points Reaction Map. Pivot Points Reaction Map is centered on reaction quality at pivot levels. Pivot Cluster Survival Map is centered on cluster durability, confluence density, and survival under pressure. In other words, one evaluates the response; the other evaluates the staying power of the pivot cluster itself.
It is also different from broader level-survival or support/resistance tools because the source engine here is explicitly pivot-derived. The script is built around Daily, Weekly, and Monthly Classic Pivot families, then transformed into a confluence-survival framework.
Methodology
The current version uses Classic Pivot calculations from higher timeframes.
1. Daily, Weekly, and Monthly pivot levels are collected.
2. Nearby pivot levels are grouped into clusters when they fall within the active cluster width.
3. The script selects the nearest upper cluster and the nearest lower cluster relative to current price.
4. Each selected cluster is evaluated with a survival model.
The survival model is based on factors such as:
- cluster density
- higher-timeframe participation
- repeated tests
- rejection behavior
- inside-zone pressure
- breach frequency
- time since structural failure
A higher survival score suggests that the cluster has remained more durable under recent interaction. A higher pressure reading suggests that the cluster is experiencing more structural stress.
The chart display is intentionally selective. Instead of plotting every pivot line independently, the script concentrates on the nearest relevant clusters and presents them as zones with a backbone line and state label. This is designed to keep the structure readable.
States / Signals
The script uses state-based interpretation rather than directional promises.
Typical state classifications include:
- Stable
- Strengthening
- Balanced
- Under Stress
- Fragile
- Failed
These states are derived from the relationship between survival and pressure. They are meant to describe the condition of the cluster, not to issue a guaranteed trading outcome.
The panel summarizes:
- nearest upper cluster
- nearest lower cluster
- dominant survival side
- cluster pressure
- pivot mix currently included in the model
The script can also generate alert conditions for:
- cluster strengthening
- cluster failure
- cluster reclaim behavior
These alerts are deterministic conditions derived from the script logic. They are informational and should be interpreted within a broader market workflow.
Key Inputs
Pivot Formula
This version is intentionally limited to Classic Pivots in order to keep the clustering and scoring model consistent.
Include Daily / Weekly / Monthly
These settings control which higher-timeframe pivot families are included in the cluster engine.
Cluster ATR Width
Controls how aggressively nearby pivot levels are merged into the same cluster using ATR-based spacing.
Cluster Percent Width
Adds a percentage-based width floor so clusters remain practical across different price scales.
Minimum Levels Per Cluster
Controls how many pivot levels are required before a true cluster is recognized.
Survival Lookback
Defines the observation window used for the durability calculations.
Visual Controls
The script includes settings for cluster visibility, labels, backbone lines, panel location, and font sizes.
Limitations & Transparency
This script is a structural reading tool. It is not a prediction engine.
A high survival score does not guarantee that price will reverse, hold, or trend from that area. A low survival score does not guarantee immediate failure. The values should be read as condition metrics for pivot-derived zones.
Because the script groups pivot levels into clusters, output can vary depending on volatility, symbol characteristics, and timeframe context. On some symbols, one side may show a stronger cluster than the other. On some charts, one side may temporarily rely on a weaker fallback anchor when cluster density is limited.
This script does not attempt to replace market structure analysis, higher-timeframe context, liquidity analysis, or risk management. It is intended to organize pivot confluence into a readable survival framework.
What this script is not:
- not a buy/sell signal engine
- not a guarantee of support or resistance
- not a standalone trade system
- not a future-price prediction model
Risk Disclosure
This script is for chart analysis and decision support only. It does not provide financial, investment, or trading advice. Markets can move unpredictably, and no indicator can eliminate risk.
Users should evaluate signals, states, and cluster conditions together with their own process, timeframe alignment, and risk controls before making any decision.
Indicator

Indicator

Indicator

BarCoreLibrary "BarCore"
BarCore is a foundational library for technical analysis, providing essential functions for evaluating the structural properties of candlesticks and inter-bar relationships.
It prioritizes ratio-based metrics (0.0 to 1.0) over absolute prices, making it asset-agnostic and ideal for robust pattern recognition, momentum analysis, and volume-weighted pressure evaluation.
Key modules:
- Structure & Range: High-precision bar and body metrics with relative positioning.
- Wick Dynamics: Absolute and relative wick analysis for identifying price rejection.
- Inter-bar Logic: Containment, coverage, and quantitative price overlap (Ratio-based).
- Gap Intelligence: Real body and price gaps with customizable significance thresholds.
- Flow & Pressure: Volume-weighted buying/selling pressure and Money Flow metrics.
isBuyingBar()
Checks if the bar is a bullish (up) bar, where close is greater than open.
Returns: bool True if the bar closed higher than it opened.
isSellingBar()
Checks if the bar is a bearish (down) bar, where close is less than open.
Returns: bool True if the bar closed lower than it opened.
barMidpoint()
Calculates the absolute midpoint of the bar's total range (High + Low) / 2.
Returns: float The midpoint price of the bar.
barRange()
Calculates the absolute size of the bar's total range (High to Low).
Returns: float The absolute difference between high and low.
barRangeMidpoint()
Calculates half of the bar's total range size.
Returns: float Half the bar's range size.
realBodyHigh()
Returns the higher price between the open and close.
Returns: float The top of the real body.
realBodyLow()
Returns the lower price between the open and close.
Returns: float The bottom of the real body.
realBodyMidpoint()
Calculates the absolute midpoint of the bar's real body.
Returns: float The midpoint price of the real body.
realBodyRange()
Calculates the absolute size of the bar's real body.
Returns: float The absolute difference between open and close.
realBodyRangeMidpoint()
Calculates half of the bar's real body size.
Returns: float Half the real body size.
upperWickRange()
Calculates the absolute size of the upper wick.
Returns: float The range from high to the real body high.
lowerWickRange()
Calculates the absolute size of the lower wick.
Returns: float The range from the real body low to low.
openRatio()
Returns the location of the open price relative to the bar's total range (0.0 at low to 1.0 at high).
Returns: float The ratio of the distance from low to open, divided by the total range.
closeRatio()
Returns the location of the close price relative to the bar's total range (0.0 at low to 1.0 at high).
Returns: float The ratio of the distance from low to close, divided by the total range.
realBodyRatio()
Calculates the ratio of the real body size to the total bar range.
Returns: float The real body size divided by the bar range. Returns 0 if barRange is 0.
upperWickRatio()
Calculates the ratio of the upper wick size to the total bar range.
Returns: float The upper wick size divided by the bar range. Returns 0 if barRange is 0.
lowerWickRatio()
Calculates the ratio of the lower wick size to the total bar range.
Returns: float The lower wick size divided by the bar range. Returns 0 if barRange is 0.
upperWickToBodyRatio()
Calculates the ratio of the upper wick size to the real body size.
Returns: float The upper wick size divided by the real body size. Returns 0 if realBodyRange is 0.
lowerWickToBodyRatio()
Calculates the ratio of the lower wick size to the real body size.
Returns: float The lower wick size divided by the real body size. Returns 0 if realBodyRange is 0.
totalWickRatio()
Calculates the ratio of the total wick range (Upper Wick + Lower Wick) to the total bar range.
Returns: float The total wick range expressed as a ratio of the bar's total range. Returns 0 if barRange is 0.
isBodyExpansion()
Checks if the current bar's real body range is larger than the previous bar's real body range (body expansion).
Returns: bool True if realBodyRange() > realBodyRange() .
isBodyContraction()
Checks if the current bar's real body range is smaller than the previous bar's real body range (body contraction).
Returns: bool True if realBodyRange() < realBodyRange() .
isWithinPrevBar(inclusive)
Checks if the current bar's range is entirely within the previous bar's range.
Parameters:
inclusive (bool) : If true, allows equality (<=, >=). Default is false.
Returns: bool True if High < High AND Low > Low .
isCoveringPrevBar(inclusive)
Checks if the current bar's range fully covers the entire previous bar's range.
Parameters:
inclusive (bool) : If true, allows equality (<=, >=). Default is false.
Returns: bool True if High > High AND Low < Low .
isWithinPrevBody(inclusive)
Checks if the current bar's real body is entirely inside the previous bar's real body.
Parameters:
inclusive (bool) : If true, allows equality (<=, >=). Default is false.
Returns: bool True if the current body is contained inside the previous body.
isCoveringPrevBody(inclusive)
Checks if the current bar's real body fully covers the previous bar's real body.
Parameters:
inclusive (bool) : If true, allows equality (<=, >=). Default is false.
Returns: bool True if the current body fully covers the previous body.
isOpenWithinPrevBody(inclusive)
Checks if the current bar's open price falls within the real body range of the previous bar.
Parameters:
inclusive (bool) : If true, includes the boundary prices. Default is false.
Returns: bool True if the open price is between the previous bar's real body high and real body low.
isCloseWithinPrevBody(inclusive)
Checks if the current bar's close price falls within the real body range of the previous bar.
Parameters:
inclusive (bool) : If true, includes the boundary prices. Default is false.
Returns: bool True if the close price is between the previous bar's real body high and real body low.
isPrevOpenWithinBody(inclusive)
Checks if the previous bar's open price falls within the current bar's real body range.
Parameters:
inclusive (bool) : If true, includes the boundary prices. Default is false.
Returns: bool True if open is between the current bar's real body high and real body low.
isPrevCloseWithinBody(inclusive)
Checks if the previous bar's closing price falls within the current bar's real body range.
Parameters:
inclusive (bool) : If true, includes the boundary prices. Default is false.
Returns: bool True if close is between the current bar's real body high and real body low.
isOverlappingPrevBar()
Checks if there is any price overlap between the current bar's range and the previous bar's range.
Returns: bool True if the current bar's range has any intersection with the previous bar's range.
bodyOverlapRatio()
Calculates the percentage of the current real body that overlaps with the previous real body.
Returns: float The overlap ratio (0.0 to 1.0). 1.0 means the current body is entirely within the previous body's price range.
isCompletePriceGapUp()
Checks for a complete price gap up where the current bar's low is strictly above the previous bar's high, meaning there is zero price overlap between the two bars.
Returns: bool True if the current low is greater than the previous high.
isCompletePriceGapDown()
Checks for a complete price gap down where the current bar's high is strictly below the previous bar's low, meaning there is zero price overlap between the two bars.
Returns: bool True if the current high is less than the previous low.
isRealBodyGapUp()
Checks for a gap between the current and previous real bodies.
Returns: bool True if the current body is completely above the previous body.
isRealBodyGapDown()
Checks for a gap between the current and previous real bodies.
Returns: bool True if the current body is completely below the previous body.
gapRatio()
Calculates the percentage difference between the current open and the previous close, expressed as a decimal ratio.
Returns: float The gap ratio (positive for gap up, negative for gap down). Returns 0 if the previous close is 0.
gapPercentage()
Calculates the percentage difference between the current open and the previous close.
Returns: float The gap percentage (positive for gap up, negative for gap down). Returns 0 if previous close is 0.
isGapUp()
Checks for a basic gap up, where the current bar's open is strictly higher than the previous bar's close. This is the minimum condition for a gap up.
Returns: bool True if the current open is greater than the previous close (i.e., gapRatio is positive).
isGapDown()
Checks for a basic gap down, where the current bar's open is strictly lower than the previous bar's close. This is the minimum condition for a gap down.
Returns: bool True if the current open is less than the previous close (i.e., gapRatio is negative).
isSignificantGapUp(minRatio)
Checks if the current bar opened significantly higher than the previous close, as defined by a minimum percentage ratio.
Parameters:
minRatio (float) : The minimum required gap percentage ratio. Default is 0.03 (3%).
Returns: bool True if the gap ratio (open vs. previous close) is greater than or equal to the minimum ratio.
isSignificantGapDown(minRatio)
Checks if the current bar opened significantly lower than the previous close, as defined by a minimum percentage ratio.
Parameters:
minRatio (float) : The minimum required gap percentage ratio. Default is 0.03 (3%).
Returns: bool True if the absolute value of the gap ratio (open vs. previous close) is greater than or equal to the minimum ratio.
trueRangeComponentHigh()
Calculates the absolute distance from the current bar's High to the previous bar's Close, representing one of the components of the True Range.
Returns: float The absolute difference: |High - Close |.
trueRangeComponentLow()
Calculates the absolute distance from the current bar's Low to the previous bar's Close, representing one of the components of the True Range.
Returns: float The absolute difference: |Low - Close |.
isUpperWickDominant(minRatio)
Checks if the upper wick is significantly long relative to the total range.
Parameters:
minRatio (float) : Minimum ratio of the wick to the total bar range. Default is 0.7 (70%).
Returns: bool True if the upper wick dominates the bar's range.
isUpperWickNegligible(maxRatio)
Checks if the upper wick is very small relative to the total range.
Parameters:
maxRatio (float) : Maximum ratio of the wick to the total bar range. Default is 0.05 (5%).
Returns: bool True if the upper wick is negligible.
isLowerWickDominant(minRatio)
Checks if the lower wick is significantly long relative to the total range.
Parameters:
minRatio (float) : Minimum ratio of the wick to the total bar range. Default is 0.7 (70%).
Returns: bool True if the lower wick dominates the bar's range.
isLowerWickNegligible(maxRatio)
Checks if the lower wick is very small relative to the total range.
Parameters:
maxRatio (float) : Maximum ratio of the wick to the total bar range. Default is 0.05 (5%).
Returns: bool True if the lower wick is negligible.
isSymmetric(maxTolerance)
Checks if the upper and lower wicks are roughly equal in length.
Parameters:
maxTolerance (float) : Maximum allowable percentage difference between the two wicks. Default is 0.15 (15%).
Returns: bool True if wicks are symmetric within the tolerance level.
isMarubozuBody(minRatio)
Candle with a very large body relative to the total range (minimal wicks).
Parameters:
minRatio (float) : Minimum body size ratio. Default is 0.9 (90%).
Returns: bool True if the bar has minimal wicks (Marubozu body).
isLargeBody(minRatio)
Candle with a large body relative to the total range.
Parameters:
minRatio (float) : Minimum body size ratio. Default is 0.6 (60%).
Returns: bool True if the bar has a large body.
isSmallBody(maxRatio)
Candle with a small body relative to the total range.
Parameters:
maxRatio (float) : Maximum body size ratio. Default is 0.4 (40%).
Returns: bool True if the bar has small body.
isDojiBody(maxRatio)
Candle with a very small body relative to the total range (indecision).
Parameters:
maxRatio (float) : Maximum body size ratio. Default is 0.1 (10%).
Returns: bool True if the bar has a very small body.
isLowerWickExtended(minRatio)
Checks if the lower wick is significantly extended relative to the real body size.
Parameters:
minRatio (float) : Minimum required ratio of the lower wick length to the real body size. Default is 2.0 (Lower wick must be at least twice the body's size).
Returns: bool True if the lower wick's length is at least `minRatio` times the size of the real body.
isUpperWickExtended(minRatio)
Checks if the upper wick is significantly extended relative to the real body size.
Parameters:
minRatio (float) : Minimum required ratio of the upper wick length to the real body size. Default is 2.0 (Upper wick must be at least twice the body's size).
Returns: bool True if the upper wick's length is at least `minRatio` times the size of the real body.
isStrongBuyingBar(minCloseRatio, maxOpenRatio)
Checks for a bar with strong bullish momentum (open near low, close near high), indicating high conviction.
Parameters:
minCloseRatio (float) : Minimum required ratio for the close location (relative to range, e.g., 0.7 means close must be in the top 30%). Default is 0.7 (70%).
maxOpenRatio (float) : Maximum allowed ratio for the open location (relative to range, e.g., 0.3 means open must be in the bottom 30%). Default is 0.3 (30%).
Returns: bool True if the bar is bullish, opened in the low extreme, and closed in the high extreme.
isStrongSellingBar(maxCloseRatio, minOpenRatio)
Checks for a bar with strong bearish momentum (open near high, close near low), indicating high conviction.
Parameters:
maxCloseRatio (float) : Maximum allowed ratio for the close location (relative to range, e.g., 0.3 means close must be in the bottom 30%). Default is 0.3 (30%).
minOpenRatio (float) : Minimum required ratio for the open location (relative to range, e.g., 0.7 means open must be in the top 30%). Default is 0.7 (70%).
Returns: bool True if the bar is bearish, opened in the high extreme, and closed in the low extreme.
isWeakBuyingBar(maxCloseRatio, maxBodyRatio)
Identifies a bar that is technically bullish but shows significant weakness, characterized by a failure to close near the high and a small body size.
Parameters:
maxCloseRatio (float) : Maximum allowed ratio for the close location relative to the range (e.g., 0.6 means the close must be in the bottom 60% of the bar's range). Default is 0.6 (60%).
maxBodyRatio (float) : Maximum allowed ratio for the real body size relative to the bar's range (e.g., 0.4 means the body is small). Default is 0.4 (40%).
Returns: bool True if the bar is bullish, but its close is weak and its body is small.
isWeakSellingBar(minCloseRatio, maxBodyRatio)
Identifies a bar that is technically bearish but shows significant weakness, characterized by a failure to close near the low and a small body size.
Parameters:
minCloseRatio (float) : Minimum required ratio for the close location relative to the range (e.g., 0.4 means the close must be in the top 60% of the bar's range). Default is 0.4 (40%).
maxBodyRatio (float) : Maximum allowed ratio for the real body size relative to the bar's range (e.g., 0.4 means the body is small). Default is 0.4 (40%).
Returns: bool True if the bar is bearish, but its close is weak and its body is small.
balanceOfPower()
Measures the net pressure of buyers vs. sellers within the bar, normalized to the bar's range.
Returns: float A value between -1.0 (strong selling) and +1.0 (strong buying), representing the strength and direction of the close relative to the open.
buyingPressure()
Measures the net buying volume pressure based on the close location and volume.
Returns: float A numerical value representing the volume weighted buying pressure.
sellingPressure()
Measures the net selling volume pressure based on the close location and volume.
Returns: float A numerical value representing the volume weighted selling pressure.
moneyFlowMultiplier()
Calculates the Money Flow Multiplier (MFM), which is the price component of Money Flow and CMF.
Returns: float A normalized value from -1.0 (strong selling) to +1.0 (strong buying), representing the net directional pressure.
moneyFlowVolume()
Calculates the Money Flow Volume (MFV), which is the Money Flow Multiplier weighted by the bar's volume.
Returns: float A numerical value representing the volume-weighted money flow. Positive = buying dominance; negative = selling dominance.
isAccumulationBar()
Checks for basic accumulation on the current bar, requiring both positive Money Flow Volume and a buying bar (closing higher than opening).
Returns: bool True if the bar exhibits buying dominance through its internal range location and is a buying bar.
isDistributionBar()
Checks for basic distribution on the current bar, requiring both negative Money Flow Volume and a selling bar (closing lower than opening).
Returns: bool True if the bar exhibits selling dominance through its internal range location and is a selling bar. Library

Live Position Sizer (LPS)Description (EN)
(Magyar leíráshoz görgess lejjebb!)
Live Position Sizer (LPS) is a discretionary trading utility designed to visualize risk, reward, and position size directly on the chart in real time.
The indicator draws a TradingView-style long or short position box and calculates the required position size based on your defined capital, maximum risk, stop-loss distance, and a user-defined lot conversion factor.
LPS is intended strictly as a decision-support and risk management tool. It does not place trades or generate automated signals.
Core features:
Automatic Long / Short position visualization
Dynamic Entry, Stop Loss, and Take Profit levels
Real-time position size calculation
Configurable Risk/Reward ratio
Fully customizable colors, transparency, and line styles
Clean, minimal on-chart labels showing direction, RR, and lot size
Only one active position box at a time for a clutter-free chart
Position sizing logic:
TradingView internally calculates position size in units, not broker-specific lots.
To bridge this difference, LPS uses a user-defined “Units per 1 Lot” multiplier.
Examples:
Forex (standard lot): 100000
Gold (XAUUSD): 1 or 100 (broker dependent)
Indices (e.g. NAS100): 1
The indicator first calculates the position size in TradingView units and then converts it to lots using this multiplier.
The displayed lot size is rounded to 0.01 lots.
Stop Loss logic:
The Stop Loss level is derived from the High or Low of a selectable previous candle.
Increasing the bar-back value places the Stop Loss further away, which:
increases stop distance
reduces position size for the same risk
Intended use:
Manual / discretionary trading
Risk management and position sizing
Trade planning and visualization
Educational purposes
Important notes:
This indicator does not execute trades
No alerts or automation by default
Lot size and contract specifications vary by broker
Always verify the exact lot or contract size with your broker before trading
------------------------------------
Description (HU)
A Live Position Sizer (LPS) egy diszkrecionális kereskedést támogató segédindikátor, amely valós időben jeleníti meg a kockázatot, a célárat és a pozícióméretet közvetlenül a charton.
Az indikátor TradingView-stílusú long vagy short pozíció boxot rajzol, és kiszámolja a szükséges pozícióméretet a megadott tőke, maximális kockázat, stop-loss távolság és egy felhasználó által definiált LOT szorzó alapján.
Az LPS nem stratégia, kizárólag döntéstámogató és kockázatkezelési eszköz.
Fő funkciók:
Automatikus Long / Short pozíció megjelenítés
Entry, Stop Loss és Take Profit szintek vizuális ábrázolása
Valós idejű pozícióméret számítás
Állítható Risk/Reward arány
Teljesen testreszabható színek, átlátszóság és vonalstílus
Letisztult chart label (irány, RR, lot méret)
Egyszerre csak egy aktív pozíció box
Pozícióméretezési logika:
A TradingView belsőleg egységekben (units) számol, nem bróker-specifikus LOT-okban.
Ennek kezelésére az LPS egy „Units per 1 Lot” beállítást használ.
Példák:
Forex standard lot: 100000
Arany (XAUUSD): 1 vagy 100 (brókertől függ)
Indexek (pl. NAS100): 1
Az indikátor először TradingView egységekben számol, majd ezt átváltja LOT-ra a megadott szorzó segítségével.
A kijelzett LOT méret 0.01-re van kerekítve.
Stop Loss logika:
A Stop Loss szint a kiválasztott korábbi gyertya high vagy low értékéből kerül meghatározásra.
Nagyobb bar-back érték:
távolabb helyezi a stopot
azonos kockázat mellett kisebb pozícióméretet eredményez
Ajánlott felhasználás:
Manuális, diszkrecionális kereskedés
Kockázatkezelés és pozícióméretezés
Trade tervezés
Oktatási célok
Fontos megjegyzések:
Az indikátor nem köt automatikusan
Alapértelmezetten nincs alert vagy automatizmus
A LOT és contract méret brókerenként eltérhet
Kereskedés előtt mindig ellenőrizd a pontos LOT / contract specifikációt a brókerednél
Indicator

MarketMind LITEM🜁rketMind LITE ────────────────────
Essential Market Awareness, Reduced to Its Core
M🜁rketMind LITE is a lightweight market awareness tool designed to display essential situational context .
It provides basic orientation and movement awareness without interpretation, risk framing, diagnostics, or decision guidance.
This script is designed as a standalone awareness layer. It does not evaluate trade quality, issue signals, or influence decision-making.
WHAT IT DOES ────────────────────
M🜁rketMind LITE presents a minimal, static view of current market conditions focused entirely on awareness rather than analysis.
The system displays only essential context, allowing traders to stay oriented without introducing judgment, noise, or implied direction.
The script provides visibility into:
Time-of-day session context
Basic market regime classification (trending, range-bound, mixed)
Short-term momentum direction only (up, down, neutral)
A clean, static HUD display
M🜁rketMind LITE also includes a minimal visual state indicator that reflects recent price responsiveness, intended to be observed over time alongside the trader’s own experience.
The goal is to support awareness without influence .
HOW TO USE IT ────────────────────
M🜁rketMind LITE is not a signal generator.
It is designed to remain visible in the background of any chart, offering quiet orientation while traders rely entirely on their own process for analysis and execution.
Common use cases include:
Maintaining session awareness
Preserving context during focused trading periods
Reducing cognitive load while monitoring markets
M🜁rketMind LITE does not evaluate risk, alignment, or opportunity.
It simply shows what is happening.
DESIGN PHILOSOPHY ────────────────────
M🜁rketMind LITE is intentionally minimal.
It includes only essential awareness elements and excludes all interpretive or evaluative logic:
Situational context only
Directional momentum (up / down / neutral)
No diagnostics, confidence, or conviction framing
No process, risk, or quality assessment
Presentation controls only (HUD on/off, size, position)
Nothing is inferred.
Nothing is suggested.
This script shows market state without interpretation.
WHO IT IS FOR ────────────────────
M🜁rketMind LITE is suited for traders who:
Want passive situational awareness
Prefer minimal on-chart information
Already operate with a defined decision process
It is not designed for:
Analytical or diagnostic use
Risk evaluation or context synthesis
Traders seeking guidance or confirmation
IMPORTANT NOTES ────────────────────
M🜁rketMind LITE does not provide financial advice
No system can predict future price behavior
This tool is designed for awareness only
Used appropriately, M🜁rketMind LITE helps traders stay oriented without interference. Indicator

Indicator

Indicator

The Ultimate Lot Size Calculator Backstory
I created this Pine Script tool to calculate lot sizes with precision. While there are many lot size calculators available on TradingView, I found that most had significant flaws. I started teaching myself Pine Script over three and a half years ago with the sole purpose of building this tool. My first version was messy and lacked accuracy, so I never published it. I wanted it to be better than any other available tool, but my limited knowledge back then held me back.
Recently, I received a request to create a similar tool, as the current options still fail to deliver the precision and reliability traders need. This inspired me to revisit my original idea. With improved skills and a better understanding of Pine Script, I redesigned the tool from scratch, making it as precise, reliable, and efficient as possible.
This tool features built-in error detection to minimize mistakes and ensure accuracy in lot size calculations. I've spent more time on this project than on any other, focusing on delivering a solution that stands out on TradingView. While I plan to add more features based on user feedback, the current version is already a powerful, dependable, and easy-to-use tool for traders who value precision and efficiency in their lot size calculations.
How to use the tool ?
At first it might seem complicated, but it is quite easy to use the tool. There are two modes: auto and manual. By default, the tool is set on manual mode. When you apply the tool on the chart, it will ask you to choose the entry price, then the stop-loss price, and at last the take-profit price. Select all of them one by one. These values can be changed later.
Settings
There are various setting given for making the tool as flexible as possible. Here is the explanation for some of most important settings. Play with them and make yourself comfortable.
General settings
Auto mode : Use this mode if you want the the risk reward to be fixed and stop loss to be based on ATR. However the stop loss can be changed to be based on user input.
Manual mode : Use this mode if you want full control over entry, stop loss and take profit.
Contract Size : The tool works perfectly for all forex pairs including gold and silver but as the contract size is different for different assets it is difficult to add every single asset into the script manually so i have provided this option. In case you want to calculate lot size for a asset other then forex, gold or silver make sure to change this. Contract size = Quantity of the asset in 1 standerd lot.
Account settings
Automatic mode settings and ATR stop settings
Manual mode settings
Table and risk-reward box settings are pretty much self-explanatory i guess.
Error handling
A lot size calculator is a complex program. There are numerous points where it may fail and produce incorrect results. To make it robust and accurate, these issues must be addressed and managed properly, which practically all existing lot size calculator scripts fail to do.
Golden tip
When the symbol is changed it will display a symbol change warning as the entry, stop loss and take profit price won't change.
There are 2 ways to get fix this. Either manually enter all three values which i hate the most or remove the script from the chart and re-apply the script on chart again.
So to re-apply the indicator in most easy way follow the following instructions:
Note : If you encounter any other error then read the instruction to fix it and if it is an unknow error pleas report it to me in comments or DM. Indicator

Indicator

Indicator

Library

Indicator

Indicator

Trade Tool VDWMA + OI RSI BasedThis indicator works only for symbols where open interest data is available.
The idea was to create a combination of Volume Delta, Open Interest, RSI, Moving Average and Support / Resistance as a unified tool.
I created a Weighted Moving Average based on the Volume Delta (VDWMA). The idea behind this was to reflect the moving average on the difference between buy and sell volume.
There are two VDWMA to determine a trend. Fast and Slow. The principle is the same as with conventional moving averages. For visualization, the candles are colored based on the following logic:
up trend = Fast VDWMA is above the Slow VDWMA and the price is above the Fast VWDWMA.
down Trend = Fast VDWMA is below the Slow VDWMA and the Short is below the Fast VDWMA
Further, support and resistance zones were defined based on the close and high prices as well as close and low prices.
A simple logic looks for divergences between RSI and price to generate first signals for possible price reversals.
Another RSI was created based on the open interest.
In combination with the conventional RSI, oversold and overbought zones were defined based on the following logic, which are marked by vertical zones on the chart.
Oversold zone = RSI is below 30 and OI RSI is above 70 or below 30 and OI opening is not greater than OI closing price
Overbought zone = RSI is above 70 and OI RSI is above 70 or below 30 and OI opening is not smaller than OI closing price
Based on this, buy and sell signals were defined.
First, the support or resistance zone must remain the same for two candles, which signals that the zone has not been breached. In addition, a divergence must occur in the RSI and the price must bounce.
newsell = resistance == resistance and high >= resistance and close < resistance and bearishDiv
newbull = support == support and low <= support and close > support and bullishDiv
The OI signaling was deliberately not included as well as the trend function. The tool should be suitable for scalping as well as for swinging. Thus, depending on the tradestyle itself to decide which points you want to trade.
Have fun with it
Indicator

Indicator

Indicator

Grid Indicator - The Quant ScienceQuickly draw a 10-level grid on your chart with our open-source tool.
Our grid tool offers a unique solution to traders looking to maximize their profits in volatile market conditions. With its advanced features, you can create customized grids based on your preferred start price and line distance, allowing you to easily execute trades and capitalize on price movements. The tool works automatically, freeing up your time to focus on other important aspects of your trading strategy.
The benefits of using this tool are numerous. Firstly, it eliminates the need for manual calculation, making the analysis process much more efficient. Secondly, the automatic nature of the tool ensures that each grids are draw at precisely prices, giving you the best possible chance of maximizing your analysis. Finally, the ability to easily customize grids means that you can adapt your strategy quickly and effectively, even in rapidly changing market conditions.
So why wait? Take control of your trading and start using our innovative grid tool today! With its advanced features and ease of use, it's the perfect solution for traders of all levels looking to take their trading to the next level.
HOW TO USE
Using it is easy. Add the script to your chart and set the price and distance between the grids. Indicator

Candle LevelsCandle Levels
Allows chart levels to be plotted automatically, simply add tool to chart and the interactive mode will prompt for candle selection, timeframe anchor and some label choices such as displaying time, price or disabling labels altogether.
Also a note can be supplied that will be shown in the labels if they're displayed, if not it'll be up in the indicator values if those are enabled. Colors and individual labels can be customized, encourage saving over defaults for repeated usage.
Levels calculated:
Standard OHLC
Close to open mid point
High to low mid point
High wick mid point (either between close or open, whichever is higher)
Low wick mid point (either between close or open, whichever is lower)
I have plans to better detected levels and labels overlap to perhaps do something with that, for now manually toggling display of label should suffice.
I've tested with various markets such as futures, standard stock markets and also various higher and lower timeframes, if something is found to not be working please let me know.
Enjoy! Indicator

Strategy
