OPEN-SOURCE SCRIPT
Macro Regime 2EMA Pro Strategy [VIX-DXY]

Macro Regime 2EMA Pro Strategy
Macro Regime 2EMA Pro Strategy is a trend-following system that evaluates market direction not only through price action, but also through broader macro risk conditions.
The strategy combines VIX (volatility), DXY (US Dollar strength), and optionally USDT Dominance with a dual EMA trend filter (EMA50 and EMA200) to identify more favorable trading environments.
Strategy Approach
This system does not focus on finding frequent entry signals.
The objective is not to predict the market, but to participate only when conditions are aligned.
The structure is built around four layers:
Macro Regime → Permission to trade
Trend Filter → Direction
Entry → Timing
Exit & Risk → Actual performance
This separation helps keep the system stable and avoids unnecessary complexity.
Macro Regime Engine
The system evaluates market conditions using:
VIX → market fear and volatility
DXY → dollar strength and capital flow
USDT Dominance → crypto liquidity direction
Each component produces a state:
Risk-On → bullish environment
Risk-Off → bearish environment
Warning → conflicting signals
Neutral → no clear direction
These states are combined using a simple voting mechanism.
Trades are only allowed when macro conditions are aligned.
Multi-Timeframe Structure
The strategy uses two timeframes:
Main timeframe → defines the overall direction
Confirm timeframe → filters the signals
This structure helps reduce noise and avoid weak setups.
All higher timeframe data is handled using confirmed values to prevent repainting.
Price-Based Entry Logic
Entries are intentionally simple:
Price above both EMA50 and EMA200 → Long
Price below both EMA50 and EMA200 → Short
This keeps the system aligned with the trend and avoids overfitting.
Exit and Risk Management
This is the core of the strategy.
The system includes:
Initial stop loss to define risk
Trailing stop to protect profits during trends
Break-even to reduce risk after favorable movement
Optional partial take profit
Optional time-based exit
The goal is to keep losses controlled and allow winners to develop.
Data Reliability
Higher timeframe data is confirmed and non-repainting.
Signals are generated on bar close.
No visible-range or chart-dependent logic is used.
This ensures consistency between backtest and live behavior.
Alerts and Automation
The strategy supports JSON-based alerts.
It can be used with webhook and automated trading systems.
By default, signals are triggered once per bar close.
Use Cases
Best suited for:
BTC and ETH
Trending altcoins
Higher timeframes such as 4H and above
Stocks
The strategy can also be used on equities, with some adjustments.
USDT Dominance is generally not relevant in stock markets.
VIX and DXY tend to have stronger influence.
Stocks may have lower volatility and session gaps.
For this reason, wider stops, higher timeframes, and a more patient approach are typically required.
Limitations
The strategy may struggle in:
Sideways markets
Low volatility conditions
Illiquid assets
Backtest Notes
Results depend on the selected asset, timeframe, and market conditions.
Standard candles are recommended.
Trading fees and slippage should be included.
Settings
The inputs are not fixed rules, but tools that shape how the system behaves.
Tighter configurations result in fewer but more selective trades.
Looser configurations increase activity but may also increase variability.
Observing how the system behaves across different conditions is more useful than trying to optimize for a single result.
General Settings Philosophy
There is no single “best” configuration for this strategy.
The goal is not to find the perfect setting for the past, but to build a structure that behaves consistently across different market environments.
A common mistake is constantly adjusting parameters to fit historical data.
While this may look good on past charts, it often does not hold up in live conditions.
A more reliable approach is to observe how the system behaves across different scenarios.
Strategy Philosophy
We do not try to predict the market.
We focus on participating only when conditions are aligned.
The system emphasizes macro alignment, structural trend confirmation, and controlled risk.
Macro Regime 2EMA Pro Strategy is a trend-following system that evaluates market direction not only through price action, but also through broader macro risk conditions.
The strategy combines VIX (volatility), DXY (US Dollar strength), and optionally USDT Dominance with a dual EMA trend filter (EMA50 and EMA200) to identify more favorable trading environments.
Strategy Approach
This system does not focus on finding frequent entry signals.
The objective is not to predict the market, but to participate only when conditions are aligned.
The structure is built around four layers:
Macro Regime → Permission to trade
Trend Filter → Direction
Entry → Timing
Exit & Risk → Actual performance
This separation helps keep the system stable and avoids unnecessary complexity.
Macro Regime Engine
The system evaluates market conditions using:
VIX → market fear and volatility
DXY → dollar strength and capital flow
USDT Dominance → crypto liquidity direction
Each component produces a state:
Risk-On → bullish environment
Risk-Off → bearish environment
Warning → conflicting signals
Neutral → no clear direction
These states are combined using a simple voting mechanism.
Trades are only allowed when macro conditions are aligned.
Multi-Timeframe Structure
The strategy uses two timeframes:
Main timeframe → defines the overall direction
Confirm timeframe → filters the signals
This structure helps reduce noise and avoid weak setups.
All higher timeframe data is handled using confirmed values to prevent repainting.
Price-Based Entry Logic
Entries are intentionally simple:
Price above both EMA50 and EMA200 → Long
Price below both EMA50 and EMA200 → Short
This keeps the system aligned with the trend and avoids overfitting.
Exit and Risk Management
This is the core of the strategy.
The system includes:
Initial stop loss to define risk
Trailing stop to protect profits during trends
Break-even to reduce risk after favorable movement
Optional partial take profit
Optional time-based exit
The goal is to keep losses controlled and allow winners to develop.
Data Reliability
Higher timeframe data is confirmed and non-repainting.
Signals are generated on bar close.
No visible-range or chart-dependent logic is used.
This ensures consistency between backtest and live behavior.
Alerts and Automation
The strategy supports JSON-based alerts.
It can be used with webhook and automated trading systems.
By default, signals are triggered once per bar close.
Use Cases
Best suited for:
BTC and ETH
Trending altcoins
Higher timeframes such as 4H and above
Stocks
The strategy can also be used on equities, with some adjustments.
USDT Dominance is generally not relevant in stock markets.
VIX and DXY tend to have stronger influence.
Stocks may have lower volatility and session gaps.
For this reason, wider stops, higher timeframes, and a more patient approach are typically required.
Limitations
The strategy may struggle in:
Sideways markets
Low volatility conditions
Illiquid assets
Backtest Notes
Results depend on the selected asset, timeframe, and market conditions.
Standard candles are recommended.
Trading fees and slippage should be included.
Settings
The inputs are not fixed rules, but tools that shape how the system behaves.
Tighter configurations result in fewer but more selective trades.
Looser configurations increase activity but may also increase variability.
Observing how the system behaves across different conditions is more useful than trying to optimize for a single result.
General Settings Philosophy
There is no single “best” configuration for this strategy.
The goal is not to find the perfect setting for the past, but to build a structure that behaves consistently across different market environments.
A common mistake is constantly adjusting parameters to fit historical data.
While this may look good on past charts, it often does not hold up in live conditions.
A more reliable approach is to observe how the system behaves across different scenarios.
Strategy Philosophy
We do not try to predict the market.
We focus on participating only when conditions are aligned.
The system emphasizes macro alignment, structural trend confirmation, and controlled risk.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.