OPEN-SOURCE SCRIPT
Cập nhật 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.
Phát hành các Ghi chú
added Timeframe settings.Phát hành các Ghi chú
added TP and SLPhát hành các Ghi chú
bug fixMã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.