OPEN-SOURCE SCRIPT
Momentum Consensus

Momentum Consensus reduces three momentum readings to a single agreement view. Each of DI-Power, BBP and the MACD-V histogram is reduced to its sign (above zero, below zero, or exactly zero), and the pane shows the net as one column: its height is the count above zero minus the count below zero (range -3 to +3), green and pointing up when bulls lead, red and pointing down when bears lead, and nothing when the two sides cancel. Only one side is ever drawn, so the column itself is the net stance. All three inputs are momentum or trend readings - DI-Power is (DI+ minus DI-) weighted by ADX, BBP is Elder Bull Bear Power over ATR, and MACD-V is the ATR-normalized MACD histogram - so the tally is a clean read of momentum agreement rather than a mix of different dimensions. Each reading is divided by its own rolling maxAbs; that scaling never subtracts a baseline, so each keeps its true zero and sign, and since the tally reads sign only, the scaling does not change the count, it just keeps each reading matching its source. When exactly one reading is on a side, a one-letter badge marks the lone reading (D for DI-Power, B for BBP, M for MACD-V) in its own colour, pinned to the top edge for a lone bull and the bottom edge for a lone bear so it never overlaps the column. Two alerts are available for when the net flips sides (its sign crosses zero), one for each direction. Everything is inferred from OHLCV. Built on public, well-documented concepts, implemented from scratch in original Pine. Descriptive context only, not a signal and not financial advice.
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.