OPEN-SOURCE SCRIPT
已更新 Demand Index Strategy

Description:
This strategy is an automated trading system based on a faithful replica of the Sierra Chart "Demand Index" (Study ID 139). It utilizes the complex pressure/volume calculations developed by James Sibbet to identify high-probability reversal points from oversold territory.
📈 Strategy Logic: "The Deep Recovery"
The Demand Index combines price and volume to measure buying vs. selling pressure. This strategy specifically looks for a "Deep Recovery" scenario where selling pressure exhausts itself and momentum shifts back to the upside.
The Entry Conditions (Long Only):
Deep Oversold Zone: The Demand Index must have visited the deep negative zone (-45) within the recent lookback period. This ensures we are watching a heavily sold-off asset.
Recovery Trigger: The Demand Index must cross up through the recovery level (-30).
Momentum Confirmation: At the moment of the crossover, the Demand Index must be above its Signal Line (EMA 10) to confirm the immediate trend direction.
⚙️ Default Settings
Buy/Sell Power Length: 10 (Shorter term focus for reaction speed).
Buy/Sell MA Length: 10.
Signal EMA Length: 10.
Deep Level: -45 (Configurable).
Trigger Level: -30 (Configurable).
🛡️ Risk Management
The strategy includes built-in inputs for risk management:
Stop Loss: Defaults to 2.0%
Take Profit: Defaults to 4.0%
Note: These can be toggled off or adjusted in the settings menu.
🔍 About the Indicator Source
This script replicates the specific math found in Sierra Chart's documentation for Study ID 139. This includes the unique H0/L0 volatility scaling, where the calculation utilizes the High and Low of the very first loaded bar to normalize the exponential decay of the buying/selling pressure.
Disclaimer: Past performance is not indicative of future results. This strategy is provided for educational purposes and demonstrates how to automate James Sibbet's Demand Index based on specific Sierra Chart logic.
This strategy is an automated trading system based on a faithful replica of the Sierra Chart "Demand Index" (Study ID 139). It utilizes the complex pressure/volume calculations developed by James Sibbet to identify high-probability reversal points from oversold territory.
📈 Strategy Logic: "The Deep Recovery"
The Demand Index combines price and volume to measure buying vs. selling pressure. This strategy specifically looks for a "Deep Recovery" scenario where selling pressure exhausts itself and momentum shifts back to the upside.
The Entry Conditions (Long Only):
Deep Oversold Zone: The Demand Index must have visited the deep negative zone (-45) within the recent lookback period. This ensures we are watching a heavily sold-off asset.
Recovery Trigger: The Demand Index must cross up through the recovery level (-30).
Momentum Confirmation: At the moment of the crossover, the Demand Index must be above its Signal Line (EMA 10) to confirm the immediate trend direction.
⚙️ Default Settings
Buy/Sell Power Length: 10 (Shorter term focus for reaction speed).
Buy/Sell MA Length: 10.
Signal EMA Length: 10.
Deep Level: -45 (Configurable).
Trigger Level: -30 (Configurable).
🛡️ Risk Management
The strategy includes built-in inputs for risk management:
Stop Loss: Defaults to 2.0%
Take Profit: Defaults to 4.0%
Note: These can be toggled off or adjusted in the settings menu.
🔍 About the Indicator Source
This script replicates the specific math found in Sierra Chart's documentation for Study ID 139. This includes the unique H0/L0 volatility scaling, where the calculation utilizes the High and Low of the very first loaded bar to normalize the exponential decay of the buying/selling pressure.
Disclaimer: Past performance is not indicative of future results. This strategy is provided for educational purposes and demonstrates how to automate James Sibbet's Demand Index based on specific Sierra Chart logic.
版本注释
added Timeframe settings.版本注释
added TP and SL版本注释
bug fix开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。