OPEN-SOURCE SCRIPT
BRN TENDENCIAL (Alta / Baixa / Neutro) — com Perfis

Objectively classify the market into 3 states: Bullish, Bearish, or Neutral.
Classic Ribbon Detection:
Bullish = MA1 > MA2 > MA3 > MA4 > MA5 > MA6
Bearish = MA1 < MA2 < MA3 < MA4 < MA5 < MA6
Neutral = when the alignment is not met (crossovers/disorder).
Optional simple mode (toggle): consider only MA1 and MA6 (Bullish = MA1 > MA6, Bearish = MA1 < MA6).
Pre-configured profiles (A/B/C) to recognize only large movements with one click.
Full manual configuration: choose the type of average (SMA/EMA/HMA/VWMA) and the periods for each of the 6 MAs.
Optional "big moves" filters:
Minimum Ribbon width (%) to require "fan opening";
Minimum MA1 slope (%) to require strong direction.
Clean visuals for quick reading: 6 Ribbon lines, background mask by state, optional bar color, and fill between MA1 and MA6.
Trademark start markers (UP/DOWN/NEUTRAL) to identify transitions on the chart.
Practical use: Serves as a trend filter for your strategies/signals (e.g., only trade Long on Highs, Short on Lows).
Focus on controlled neutrality: With profiles and filters, it prioritizes Neutral in noise and only marks a trend when the movement is truly significant.
Classic Ribbon Detection:
Bullish = MA1 > MA2 > MA3 > MA4 > MA5 > MA6
Bearish = MA1 < MA2 < MA3 < MA4 < MA5 < MA6
Neutral = when the alignment is not met (crossovers/disorder).
Optional simple mode (toggle): consider only MA1 and MA6 (Bullish = MA1 > MA6, Bearish = MA1 < MA6).
Pre-configured profiles (A/B/C) to recognize only large movements with one click.
Full manual configuration: choose the type of average (SMA/EMA/HMA/VWMA) and the periods for each of the 6 MAs.
Optional "big moves" filters:
Minimum Ribbon width (%) to require "fan opening";
Minimum MA1 slope (%) to require strong direction.
Clean visuals for quick reading: 6 Ribbon lines, background mask by state, optional bar color, and fill between MA1 and MA6.
Trademark start markers (UP/DOWN/NEUTRAL) to identify transitions on the chart.
Practical use: Serves as a trend filter for your strategies/signals (e.g., only trade Long on Highs, Short on Lows).
Focus on controlled neutrality: With profiles and filters, it prioritizes Neutral in noise and only marks a trend when the movement is truly significant.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.