OPEN-SOURCE SCRIPT
Dynamic Buying and Selling Power (ADTM)

什么是 ADTM?
ADTM(Dynamic Buying and Selling Power Indicator,动态买卖气指标)是一种经典的动量与反转量化指标。它通过对比开盘价的跃升与下挫,精确量化开盘后多空双方的推进力度(即爆发力),并将这种力量对比归一化在 [-1, 1]的固定区间内。
与传统单纯依赖收盘价(Close)的振荡指标不同,ADTM 更加关注开盘价(Open)相对于前一交易日的位置以及当日极值(High/Low)的延伸空间,从而能够更敏锐地捕捉到市场资金的日内异动。
---
为什么使用它?
在波诡云谲的市场中,单纯的均线或 lagging 指标容易产生钝化。ADTM 的优势在于:
- 无量纲化区间:其输出被严格限制在 [-1, 1]之间,避免了绝对数值对趋势研判的干扰。
- 日内真实动能:通过计算买方动态能量(DTM)和卖方动态能量(DBM),能够更早地在左侧识别出多空力量的衰竭点。
- 极佳的反转提示:特别适合配合超买超卖边界进行逆势(反转)波段的卡点操作。
---
怎么用?
本指标的使用逻辑非常直观,默认参数为经典配置:N = 23(求和周期),M = 8(信号均线周期)。
- 左侧买点(超卖区):
当蓝色 ADTM 曲线跌破 -0.5时,意味着市场短期内空头宣泄极快,进入超卖状态。这通常是极佳的左侧分批布局或观察止跌反转的买点。 - 左侧风险(超买区):
当蓝色 ADTM 曲线突破 +0.5时,意味着多头短期冲锋过急,进入超买状态。此时应防范多头力竭回撤,注意锁定利润或降低仓位。 - 中轴信号:
0轴为多空分界线。当 ADTM 在 0 轴上方运行时,多头占优;反之,空头占优。 - 均线交叉:
蓝色主线(ADTM)与橙色信号线(MA_ADTM)的黄金交叉与死亡交叉,可作为右侧动能确认的辅助信号。
---
在哪里用?
本指标采用纯粹的价格几何结构算法,具有极强的普适性:
- 适用市场:广泛适用于 A 股、美股、加密货币、商品期货以及外汇等主流交易市场。
- 适用周期:在日线(Daily)及以上大周期中表现尤为稳定,能够有效过滤盘整期的日内噪音;在小周期(如 1H/4H)中,配合趋势背景亦可用于日内波段捕捉。
---
原创与致谢声明
指标原创作者:本指标的核心算法源自经典量化分析领域的经典设计。
脚本重构与发布:由本人进行 Pine Script v6 的标准化重构、算法优化与开源发布。
风险提示:任何技术指标都无法百分之百预测市场。建议将 ADTM 融入自身的交易系统中,结合量价结构、关键支撑阻力位以及严谨的资金管理共同使用。
---
What is ADTM?
ADTM (Dynamic Buying and Selling Power Indicator) is a classic momentum and reversal quantification tool. It precisely quantifies the offensive strength (i.e., explosive power) of both bulls and bears after the market opens by comparing the upward jumps and downward drops of the opening price, and normalizes this power comparison within a fixed range of [-1, 1].
Unlike traditional oscillators that rely solely on the closing price (Close), ADTM places greater emphasis on the opening price (Open) relative to the previous trading day's position, as well as the extension space of the day's extremes (High/Low), enabling it to more keenly capture intraday anomalies in market capital flow.
---
Why Use It?
In volatile and unpredictable markets, simple moving averages or lagging indicators are prone to desensitization (flattening). The advantages of ADTM are:
- Dimensionless interval: Its output is strictly confined within [-1, 1], eliminating the interference of absolute price levels on trend assessment.
- Intraday true momentum: By calculating Dynamic Buying Momentum (DTM) and Dynamic Selling Momentum (DBM), it can identify exhaustion points of bullish/bearish power earlier on the left side.
- Excellent reversal signals: Particularly well-suited for contrarian (reversal) swing trading by utilizing overbought/oversold boundaries.
---
How to Use It?
The usage logic of this indicator is highly intuitive, with default parameters set to the classic configuration: N = 23 (Summation Period), M = 8 (Signal MA Period).
- Left-side Buy Signal (Oversold Zone):
When the blue ADTM line drops below -0.5, it indicates that bearish forces have been excessively unleashed in the short term, entering an oversold state. This is typically an excellent opportunity for left-side accumulation or observing for a bullish reversal. - Left-side Risk Signal (Overbought Zone):
When the blue ADTM line rises above +0.5, it indicates that bullish forces have pushed too aggressively in the short term, entering an overbought state. At this point, one should be cautious of bullish exhaustion and pullbacks, and consider locking in profits or reducing positions. - Zero-Line Signal:
The 0.0 axis serves as the bull-bear dividing line. When ADTM is above 0, bulls are in control; when below 0, bears are in control. - Moving Average Crossover:
The golden cross and death cross between the blue main line (ADTM) and the orange signal line (MA_ADTM) can serve as auxiliary signals for right-side momentum confirmation.
---
Where to Use It?
This indicator employs a pure geometric price-structure algorithm, offering strong universality:
- Applicable Markets: Widely applicable to A-shares, U.S. stocks, cryptocurrencies, commodity futures, forex, and other major trading markets.
- Applicable Timeframes: Performs particularly well on Daily and higher timeframes, effectively filtering out intraday noise during consolidation periods. On lower timeframes (e.g., 1H/4H), it can also be used for intraday swing trading when combined with the broader trend context.
---
Acknowledgments & Originality Statement
Original Author: The core algorithm of this indicator originates from classic designs in the field of quantitative analysis.
Script Re-engineering & Release: This script has been fully refactored, optimized, and released as open-source by myself.
Risk Disclaimer: No technical indicator can predict the market with 100% accuracy. It is strongly recommended to integrate ADTM into your own trading system, combining it with volume-price structure, key support/resistance levels, and strict risk management practices.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.