OPEN-SOURCE SCRIPT
ที่อัปเดต:

Reference Price Operating Map [AGPro Series]

670
Reference Price Operating Map [AGPro Series]

🔹 OVERVIEW

Reference Price Operating Map [AGPro Series] is a focused overlay that consolidates the four most universally watched reference prices — Daily Open, Weekly Open, Monthly Open, and Previous Close — into a single operating map. It tracks how price interacts with each level in real time, attributes control to the reference currently leading price action, groups overlapping references into confluence clusters, and fades distant context so the active map stays clean.

The chart answers one direct question at a glance: which reference is controlling the session right now.

Built for intraday operators, swing traders, and position traders who anchor their bias to session and period opens. Works on any symbol and any intraday or daily timeframe.


🔸 WHAT MAKES IT DIFFERENT

Most open-line indicators simply draw horizontal lines for Daily, Weekly, Monthly, and Previous Close and stop there. This script goes further by adding four layers on top of those lines:

• State tracking — each reference is classified as Untouched, 1st Touch, Tested, Held, Reclaimed, or Rejected, and the state updates bar by bar as price interacts with the level.

• Control attribution — a proximity-weighted scoring system selects one reference as the current "controller" of price action, highlighted with a dominant-row background in the panel and a thicker line on the chart.

• Confluence grouping — when two or more references sit within 0.5 ATR of each other, they collapse into a single cluster label (for example "D-Open + W-Open + PClose") instead of stacking separate labels on top of each other.

• Distance-aware rendering — references far from current price are demoted to a thin gray zone with a dotted line, keeping them visible as structural context without crowding the active map.

The engine also includes a far-aware state machine: references that price has not meaningfully engaged stay in the Untouched state instead of being forced into misleading classifications.


🔷 METHODOLOGY

Reference levels are pulled directly from the higher timeframe open (Daily, Weekly, Monthly) and the previous daily close using lookahead-safe security calls on confirmed bars.

Distance classification uses ATR(14) as a volatility scale. A reference is considered "near" when price is within a configurable ATR multiple and "far" when it exceeds the far-distance threshold. This adapts the map to both low-volatility ranges and high-volatility expansions without manual tuning.

State transitions are driven by a finite state machine with six states. Key transitions:

• Untouched → 1st Touch when price enters the touch zone (default 0.25 ATR) or wicks through it.
• 1st Touch / Tested → Held when price moves cleanly away from the level on the same side.
• 1st Touch / Tested → Reclaimed when price closes on the opposite side (optionally requiring multi-bar confirmation).
• Any engaged state → Rejected when a large wick rebounds from the level with more than 60 percent wick ratio.
• Held / Rejected → Reclaimed on a confirmed cross.

The control score combines proximity (how close price is to the reference relative to ATR) with a state weight (Reclaimed and 1st Touch score highest, Held scores lowest). The reference with the highest score is tagged as controller; if no reference has meaningful engagement the panel reports No Active Control.


🔶 SIGNALS AND ALERTS

Three alert conditions are exposed:

• Reference Touched — fires the first time any reference is touched in its period.
• Reference Reclaimed — fires when any reference transitions into the Reclaimed state.
• Reference Rejected — fires when a large-wick rejection bar is registered at any reference.

On-chart, first-touch diamond markers are placed on recent bars to make period engagement easy to spot in screenshots and reviews. The panel footer reports the current controller and updates in real time.


🔹 KEY INPUTS

Reference Lines — independent toggles for Daily Open, Weekly Open, Monthly Open, and Previous Close.

Display — Show Active References Only (hide untouched references for a cleaner map), Strict Reclaim Confirmation (require multiple confirmation bars for Reclaim), Label Density (Minimal shows only the dominant reference, Normal shows all active, Detailed appends state names to labels), Show Reaction Bands, Mark First Touches.

Panel — position (four corners), font size, label font size. All default to Normal per AG Pro Series visual standards.

Sensitivity — Touch Threshold (ATR multiple defining a touch), Reclaim Confirm Bars (strict-mode confirmation count), Band Width (reaction band width in ATR), Far Distance (ATR multiple beyond which references are faded to context).

All parameters are ATR-scaled so defaults transfer cleanly across instruments and timeframes.


🔸 HOW TO USE

1. Open the panel and read the controller. If the footer shows "D-Open Controls" with a Bull bias, intraday operators treat Daily Open as the session pivot and trade with that bias until the state changes.

2. Watch the confluence label. A grouped label such as "D-Open + W-Open + PClose" means three references are stacked — a cluster of this kind is typically a higher-conviction zone than a single isolated reference.

3. Use state transitions as triggers. A Rejected state at Monthly Open during a rally is a different signal than a Reclaimed state at the same level. The state tells you what just happened at the level, not just where the level is.

4. Use the far zone as context. A Monthly Open plotted as a gray zone five ATR away from price is not an execution level — it is orientation. When price approaches it, the zone transitions into an active band and the state engine re-engages.

5. Combine with your own structure work. This map is designed to sit underneath price action analysis, order flow, or trend tools, not replace them.


🔷 LIMITATIONS AND TRANSPARENCY

• This is an indicator, not a strategy. No entries, exits, position sizing, or backtesting is performed.

• Reference prices are sourced from higher timeframe candles using confirmed lookahead. Results on intraday charts should match the official Daily, Weekly, and Monthly opens of the exchange the chart is connected to.

• State classifications are heuristic. They describe observed behavior at each level in historical terms and should not be read as forecasts. A Reclaimed state is a description of what just happened, not a prediction of what comes next.

• ATR-based thresholds mean the map adapts to volatility but can feel different on very low-volume or very thinly traded instruments. Adjust the touch threshold and far distance inputs if defaults feel too loose or too tight.

• Confluence grouping uses a 0.5 ATR window. On very wide-range days this window can become large; on very narrow ranges it can feel tight.


🔶 RISK DISCLOSURE

This indicator is provided for informational and educational purposes only. It does not constitute financial advice, investment advice, trading advice, or any other form of advice. Past performance of any level, state, or methodology shown on the chart does not guarantee future results. Trading and investing involve substantial risk of loss. You alone are responsible for your decisions, for managing your risk, and for complying with the laws and regulations that apply to you. Test any tool on a demo account or in paper trading before using it with real capital.
Release Note
UPDATE NOTES - V1.4

This update focuses on readability, visual structure, chart clarity, and usability.

The core purpose of the script remains unchanged.
This release improves how the existing reference-price operating logic is presented, organized, and interpreted on the chart.

This script continues to function as an analytical and visualization tool.
It does not attempt to predict price direction or provide guaranteed outcomes.


------------------------
What Changed
------------------------

* Refined the publication identity
The script title now follows the updated AGPro Series naming standard while the panel title keeps the AG Pro brand format.

* Added a 0-100 control score
The script now scores which reference is most actively controlling price based on proximity and state quality.

* Added a live right-edge control tag
The controlling reference and control score now remain visible on the right side of the chart.

* Added a centered confluence zone
When multiple references cluster near the controlling level, the shared area can be highlighted with a centered label.

* Rebuilt the panel interface
The panel now uses the standard single merged blue header row with configurable theme, position, and font size.

* Improved label density control
Minimal, Balanced, and Detailed modes now control how much reference labeling appears on the chart.


------------------------
Visual Improvements
------------------------

* Improved chart readability by separating reference lines, reaction bands, confluence zones, and live control tags.

* Reduced right-edge clutter by simplifying reference labels and spacing them by rank.

* Refined visual hierarchy so the dominant reference is visually stronger than secondary references.

* Added centered confluence labeling inside the active reference cluster.

* Reduced first-touch clutter by keeping touch labels off by default and limiting them to Detailed density mode.

* Shortened the centered confluence label so it does not collide with nearby reference labels.

* Suppressed individual reference labels inside a confluence cluster in Balanced mode so the cluster reads as one clean zone.


------------------------
Interface & Usability
------------------------

* Added a Show Panel toggle that remains enabled by default.

* Added configurable panel position, panel theme, panel font size, and label font size.

* Reorganized the panel into Control, Action, Score, Location, Confluence, and Active references.

* Added separate toggles for reference lines, reaction bands, confluence zone, first-touch marks, and live control tag.

* Added clearer professional English tooltips for the updated controls.


------------------------
Behavior Notes
------------------------

This update does not change the core analytical purpose of the script.

The script continues to map Daily Open, Weekly Open, Monthly Open, and Previous Close as operating references.

The goal is to improve clarity and usability, not to introduce predictive behavior.

Users should interpret outputs the same way as before, but with better control attribution and stronger visual structure.


------------------------
Limitations Reminder
------------------------

The script remains a rule-based analytical tool.

Market conditions such as low liquidity, gaps, extreme volatility, session differences, and timeframe differences may affect how reference interactions appear.

Outputs should always be interpreted within broader market context.


------------------------
Risk Reminder
------------------------

This script is for educational and analytical purposes only.

It does not provide financial advice or guaranteed trading outcomes.

Users remain responsible for their own decisions.
Release Note
UPDATE NOTES - V1.5

This update focuses on panel control, reference-label readability, confluence-zone presentation, and chart interpretation.

The core purpose of the script remains unchanged.
This release improves how the existing reference-price operating logic is presented, organized, and interpreted on the chart.

This script continues to function as an analytical and visualization tool.
It does not attempt to predict price direction or provide guaranteed outcomes.


------------------------
What Changed
------------------------

- Added a complete panel location control.
The panel now supports top, middle, bottom, left, center, and right anchor positions for more flexible publication layouts.

- Improved panel rebuild behavior.
Panel position, theme, and visibility changes are now handled cleanly so the panel keeps its intended layout and border styling.

- Refined the panel information flow.
The panel now reads from Workflow to Control, Action, Score / State, Location, Confluence, and Active for clearer first-glance interpretation.

- Added live control tag spacing control.
The new Live Tag Offset Bars input lets users move the right-edge control tag farther away from candles and reference labels.

- Added a standalone Control Area visual.
When no multi-reference confluence cluster is active, the dominant operating reference can now show a subtle centered Control Area badge so the chart keeps a clearer visual story.

- Refined visible chart label casing.
Reference labels, confluence badges, first-touch marks, and live control tags now use premium readable casing instead of lowercase slug-style text.

- Preserved the core reference-price engine.
Daily Open, Weekly Open, Monthly Open, Previous Close, touch detection, hold, reclaim, rejection, control scoring, and confluence grouping remain aligned with the prior version.


------------------------
Visual Improvements
------------------------

- Added a centered premium confluence-zone badge with filled background and white text.

- Added a centered Control Area badge for single-reference control conditions.

- Standardized chart label, confluence badge, touch mark, and live tag text as white text inside filled color boxes.

- Improved chart readability by keeping lowercase-hyphen text out of visible chart labels and right-edge tags.

- Kept default label density balanced so the chart provides meaningful reference-price context without overcrowding.


------------------------
Interface & Usability
------------------------

- Kept panel show/hide, theme, location, and font-size controls available from settings.

- Kept label font-size control with Normal as the default for chart labels, confluence badges, touch marks, and live tags.

- Added adjustable live tag projection for cleaner right-edge spacing.

- Maintained the single merged blue AG Pro panel header.


------------------------
Behavior Notes
------------------------

This update does not change the core analytical logic of the script.

The goal is to improve clarity and usability, not to introduce new predictive behavior.

Users should interpret outputs the same way as before, but with a cleaner panel sequence and improved visible chart text.


------------------------
Limitations Reminder
------------------------

The script remains a rule-based analytical tool.

Market conditions such as volatility, liquidity, timeframe differences, session behavior, and reference proximity may affect how operating states appear.

Outputs should always be interpreted within broader market context.


------------------------
Risk Reminder
------------------------

This script is for educational and analytical purposes only.

It does not provide financial advice or guaranteed trading outcomes.

Users remain responsible for their own decisions.
Release Note
🔧 UPDATE NOTES - v1.6

This update adds a reclaim follow-through proof and contrast-safe badge text everywhere.

The core purpose of the script remains unchanged.
It continues to track Daily Open, Weekly Open, Monthly Open and Previous Close as operating
references and map touch, hold, reclaim, rejection, control score and confluence.

This script continues to function as an analytical and visualization tool.
It does not attempt to predict price direction or provide guaranteed outcomes.

------------------------
What Changed
------------------------

- Reclaim Rate proof layer
The panel now reports how often a reclaimed reference historically followed through in the
reclaim direction rather than failing back across the level, shown with the sample count.

- Reclaim proof window input
A new setting controls the window used to measure post-reclaim follow-through.

- Honest, conservative counting
Each reclaim is counted once, and a failed reclaim back across the level or a window expiry
without follow-through is treated as not-followed, so the rate stays realistic.

------------------------
Visual Improvements
------------------------

- Contrast-safe text on every badge, label, tag and panel cell, so readouts stay readable on
amber, pink, teal and indigo backgrounds and on both dark and light chart themes

- Kept the reference lines, reaction bands, confluence zone and control area unchanged

- Maintained centered confluence and control-area badges and balanced label density

- Preserved a clean, uncluttered first-glance read

------------------------
Interface & Usability
------------------------

- Added a Reclaim Rate row for an at-a-glance reclaim follow-through track record

- Added a window setting so the proof measures prompt follow-through

- Improved badge legibility across all states and themes

- Enhanced overall user experience without changing the core reference logic

------------------------
Behavior Notes
------------------------

This update does not change the core analytical logic of the script.

The reference states, control score, confluence and dominant reference are unchanged. The
Reclaim Rate is a separate historical track-record layer and does not alter detection.

------------------------
Limitations Reminder
------------------------

The script remains a rule-based analytical tool.

Market conditions such as volatility, liquidity and timeframe differences may affect how
references, states and the rate appear.

Outputs should always be interpreted within broader market context.

------------------------
Risk Reminder
------------------------

This script is for educational and analytical purposes only.

It does not provide financial advice or guaranteed trading outcomes.

Users remain responsible for their own decisions.

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน