OPEN-SOURCE SCRIPT
2026 CHRISTMAS PRESENT

CHRISTMAS PRESENT
Overview
The Cash Detector is a comprehensive trading strategy that combines momentum analysis with price action confirmation to identify high-probability entry points. This strategy is designed to capture trend reversals and continuation moves by requiring multiple confirming signals before entry, significantly reducing false signals common in single-indicator systems.
Strategy Background
The strategy is built on the principle of confluence trading requiring multiple technical factors to align before taking a position. It focuses on two critical phases of market rotation:
Q2 Momentum Phase: Uses MACD crossovers to identify shifts in market momentum, signaling when bulls or bears are gaining control.
Q4 Trigger Phase: Employs engulfing candlestick patterns to confirm strong directional pressure and validate the momentum signal with actual price action.
By combining these elements, the strategy filters out weak signals and focuses only on setups where both momentum AND price action agree on direction.
Key Features
[1]Dual Confirmation System: Requires both MACD momentum shift and engulfing candle pattern
[2]RSI Filter: Optional overbought/oversold filter to avoid extreme conditions
[3]Built-in Risk Management: Configurable stop loss and take profit levels
[4]Performance Dashboard: Real-time ROI metrics displayed on chart
[5]Full Backtesting: Strategy mode allows historical performance analysis
Trading Rules
LONG ENTRY BUY
All conditions must occur on the same candle:
1. Momentum Confirmation:
MACD line crosses above signal line bullish crossover
2. Price Action Confirmation:
Bullish engulfing pattern forms:
Current close greater than previous open
Current open less than previous close
Current close greater than current open
3. RSI Filter Optional:
RSI less than 70 not overbought
Visual Signal: Green LONG label appears below the candle
SHORT ENTRY SELL
All conditions must occur on the same candle:
1. Momentum Confirmation:
MACD line crosses below signal line bearish crossover
2. Price Action Confirmation:
Bearish engulfing pattern forms:
Current close less than previous open
Current open greater than previous close
Current close less than current open
3. RSI Filter Optional:
RSI greater than 30 not oversold
Visual Signal: Red SHORT label appears above the candle
Exit Rules
Stop Loss Default 2 percent
Long: Exit if price drops 2 percent below entry
Short: Exit if price rises 2 percent above entry
Take Profit Default 4 percent
Long: Exit if price rises 4 percent above entry
Short: Exit if price drops 4 percent below entry
Input Parameters
Indicator Settings
MACD Fast Length: 12 default
MACD Slow Length: 26 default
RSI Length: 14 default
Risk Management
Use Stop Loss: Enable or disable stop loss
Stop Loss percent: Percentage risk per trade default 2 percent
Use Take Profit: Enable or disable take profit
Take Profit percent: Target profit per trade default 4 percent
Filters
Use RSI Filter: Enable or disable RSI overbought oversold filter
RSI Overbought: Upper threshold default 70
RSI Oversold: Lower threshold default 30
Performance Metrics
The built-in dashboard displays:
Net Profit: Total profit loss in currency and percentage
Total Trades: Number of completed trades
Win Rate: Percentage of profitable trades
Profit Factor: Ratio of gross profit to gross loss
Average Win Loss: Mean profit per winning losing trade
Max Drawdown: Largest peak to trough decline
Best Practices
1. Timeframe Selection: Works on multiple timeframes test on 15min 1H 4H and daily
2. Market Conditions: Most effective in trending markets with clear momentum
3. Risk Reward Ratio: Default 1:2 ratio 2 percent risk 4 percent reward is conservative adjust based on backtesting
4. Combine with Context: Consider overall market trend and support resistance levels
5. Backtest First: Always backtest on your specific instrument and timeframe before live trading
Risk Disclaimer
This strategy is for educational purposes. Past performance does not guarantee future results. Always:
Backtest thoroughly on historical data
Paper trade before using real capital
Use proper position sizing and risk management
Never risk more than you can afford to lose
Customization Tips
Aggressive traders: Reduce stop loss to 1.5 percent increase take profit to 5 percent
Conservative traders: Increase stop loss to 3 percent reduce take profit to 3 percent
Ranging markets: Enable RSI filter to avoid false breakouts
Strong trends: Disable RSI filter to catch all momentum shifts
Technical Details
Indicators Used:
Moving Average Convergence Divergence MACD
Relative Strength Index RSI
Candlestick Pattern Recognition
Strategy Type: Trend following with momentum confirmation
Best Suited For: Stocks Forex Crypto Indices
Version 1.0
Compatible with Pine Script v5
Overview
The Cash Detector is a comprehensive trading strategy that combines momentum analysis with price action confirmation to identify high-probability entry points. This strategy is designed to capture trend reversals and continuation moves by requiring multiple confirming signals before entry, significantly reducing false signals common in single-indicator systems.
Strategy Background
The strategy is built on the principle of confluence trading requiring multiple technical factors to align before taking a position. It focuses on two critical phases of market rotation:
Q2 Momentum Phase: Uses MACD crossovers to identify shifts in market momentum, signaling when bulls or bears are gaining control.
Q4 Trigger Phase: Employs engulfing candlestick patterns to confirm strong directional pressure and validate the momentum signal with actual price action.
By combining these elements, the strategy filters out weak signals and focuses only on setups where both momentum AND price action agree on direction.
Key Features
[1]Dual Confirmation System: Requires both MACD momentum shift and engulfing candle pattern
[2]RSI Filter: Optional overbought/oversold filter to avoid extreme conditions
[3]Built-in Risk Management: Configurable stop loss and take profit levels
[4]Performance Dashboard: Real-time ROI metrics displayed on chart
[5]Full Backtesting: Strategy mode allows historical performance analysis
Trading Rules
LONG ENTRY BUY
All conditions must occur on the same candle:
1. Momentum Confirmation:
MACD line crosses above signal line bullish crossover
2. Price Action Confirmation:
Bullish engulfing pattern forms:
Current close greater than previous open
Current open less than previous close
Current close greater than current open
3. RSI Filter Optional:
RSI less than 70 not overbought
Visual Signal: Green LONG label appears below the candle
SHORT ENTRY SELL
All conditions must occur on the same candle:
1. Momentum Confirmation:
MACD line crosses below signal line bearish crossover
2. Price Action Confirmation:
Bearish engulfing pattern forms:
Current close less than previous open
Current open greater than previous close
Current close less than current open
3. RSI Filter Optional:
RSI greater than 30 not oversold
Visual Signal: Red SHORT label appears above the candle
Exit Rules
Stop Loss Default 2 percent
Long: Exit if price drops 2 percent below entry
Short: Exit if price rises 2 percent above entry
Take Profit Default 4 percent
Long: Exit if price rises 4 percent above entry
Short: Exit if price drops 4 percent below entry
Input Parameters
Indicator Settings
MACD Fast Length: 12 default
MACD Slow Length: 26 default
RSI Length: 14 default
Risk Management
Use Stop Loss: Enable or disable stop loss
Stop Loss percent: Percentage risk per trade default 2 percent
Use Take Profit: Enable or disable take profit
Take Profit percent: Target profit per trade default 4 percent
Filters
Use RSI Filter: Enable or disable RSI overbought oversold filter
RSI Overbought: Upper threshold default 70
RSI Oversold: Lower threshold default 30
Performance Metrics
The built-in dashboard displays:
Net Profit: Total profit loss in currency and percentage
Total Trades: Number of completed trades
Win Rate: Percentage of profitable trades
Profit Factor: Ratio of gross profit to gross loss
Average Win Loss: Mean profit per winning losing trade
Max Drawdown: Largest peak to trough decline
Best Practices
1. Timeframe Selection: Works on multiple timeframes test on 15min 1H 4H and daily
2. Market Conditions: Most effective in trending markets with clear momentum
3. Risk Reward Ratio: Default 1:2 ratio 2 percent risk 4 percent reward is conservative adjust based on backtesting
4. Combine with Context: Consider overall market trend and support resistance levels
5. Backtest First: Always backtest on your specific instrument and timeframe before live trading
Risk Disclaimer
This strategy is for educational purposes. Past performance does not guarantee future results. Always:
Backtest thoroughly on historical data
Paper trade before using real capital
Use proper position sizing and risk management
Never risk more than you can afford to lose
Customization Tips
Aggressive traders: Reduce stop loss to 1.5 percent increase take profit to 5 percent
Conservative traders: Increase stop loss to 3 percent reduce take profit to 3 percent
Ranging markets: Enable RSI filter to avoid false breakouts
Strong trends: Disable RSI filter to catch all momentum shifts
Technical Details
Indicators Used:
Moving Average Convergence Divergence MACD
Relative Strength Index RSI
Candlestick Pattern Recognition
Strategy Type: Trend following with momentum confirmation
Best Suited For: Stocks Forex Crypto Indices
Version 1.0
Compatible with Pine Script v5
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.
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.