OPEN-SOURCE SCRIPT
OA - Price Magnet Zones

Overview
The Price Magnet Zones indicator identifies special price levels that have a high statistical probability of being revisited by price in the future.
It works by detecting candles with specific formation characteristics - those without top or bottom wicks - which often signify important market levels that price tends to return to.
Key Features
Automated Detection: Identifies special candle formations automatically and draws horizontal lines at these levels
Dynamic Management Removes lines once price touches them or when they exceed the lookback period
Statistical Analysis: Tracks touch rates and average time until price returns to these levels
Clean Visual Interface: Shows only untouched levels for a clear chart view
How It Works
The indicator detects two specific types of candle formations:
- Bullish Levels: Candles with no bottom wick (open = low) that close higher
- Bearish Levels: Candles with no top wick (open = high) that close lowe
These formations often represent hidden liquidity zones or order blocks where price tends to return. The indicator draws horizontal lines at these levels and tracks whether price revisits them.
Statistics Tracking
- The indicator maintains comprehensive statistics about the detected levels:
- Total Levels: Number of bullish, bearish, and total levels detected
- Touched Levels: Number of levels that price has returned to touch
- Touch Rate: Percentage of levels that have been touched by price
- Average Touch Time: Average number of bars until price touches each level type
Trading Applications
These hidden levels can be valuable for:
- Identifying potential support and resistance zones
- Finding entry and exit points for trades
- Setting stop loss levels
- Determining price targets
- Confirming other technical signals
Settings
- Max Bars to Track: Maximum number of bars to keep tracking a level (default: 500)
- Line Thickness: Visual thickness of the horizontal lines (1-4)
- Line Color: Color of the horizontal lines
- Min Candles Before Check: Number of candles to wait before including touches in statistics (default: 3)
- Show Statistics: Toggle statistics table display
Usage Tips
- The statistics only count touches that occur after the specified minimum number of candles have passed, providing more meaningful data
- Higher touch rates indicate stronger magnetic properties of these levels
- The average touch time can help with timing expectations for trades
- These levels work across various timeframes and markets
- For best results, use alongside other technical analysis tools
This indicator does not provide trading signals but offers valuable insights into hidden market structure that can enhance your trading strategy.
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。