OPEN-SOURCE SCRIPT
Sequential MACD 0.5+ & MA Cloud Strategy

This indicator provides sequential buy and sell signals based on a robust set of trend-following and momentum conditions:
Buy Signal Logic:
Momentum: Both the MACD line and the Signal line are above the 0.5 threshold, indicating strong bullish momentum.
Crossover: A bullish MACD crossover (MACD above Signal line) has occurred near the zero line, suggesting the start of a new, healthy momentum wave.
Trend Filter (4H TF): The current price must be above the 21 and 50 EMAs on the 4-hour timeframe.
Price Action: The current candle must be green (closing higher than open).
Sequential Logic: A buy signal is only generated if a position is not already active.
Sell Signal Logic:
Momentum Reversal: MACD line is below the Signal line (negative histogram).
Price Action: The current candle must be red.
MA Cloud: The price is below the 9 and 21 EMA Cloud.
Sequential Logic: A sell signal is only generated if a buy signal was previously active.
This comprehensive filter system aims to capture strong, confirmed moves while avoiding noisy signals against higher-timeframe trends.
Buy Signal Logic:
Momentum: Both the MACD line and the Signal line are above the 0.5 threshold, indicating strong bullish momentum.
Crossover: A bullish MACD crossover (MACD above Signal line) has occurred near the zero line, suggesting the start of a new, healthy momentum wave.
Trend Filter (4H TF): The current price must be above the 21 and 50 EMAs on the 4-hour timeframe.
Price Action: The current candle must be green (closing higher than open).
Sequential Logic: A buy signal is only generated if a position is not already active.
Sell Signal Logic:
Momentum Reversal: MACD line is below the Signal line (negative histogram).
Price Action: The current candle must be red.
MA Cloud: The price is below the 9 and 21 EMA Cloud.
Sequential Logic: A sell signal is only generated if a buy signal was previously active.
This comprehensive filter system aims to capture strong, confirmed moves while avoiding noisy signals against higher-timeframe trends.
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.