OPEN-SOURCE SCRIPT
Stock Scoring System

The EMA Scoring System is designed to help traders quickly assess market trend strength and decide portfolio allocation. It compares price vs. key EMAs (21, 50, 100) and also checks the relative strength between EMAs. Based on these conditions, it assigns a score (-6 to +6) and a corresponding allocation percentage.
+6 Score = 100% allocation (strong bullish trend)
-6 Score = 10% allocation (strong bearish trend)
Scores in between represent intermediate trend strength.
📌 Key Features
✅ Scoring Model: Evaluates price vs. EMA alignment and EMA cross relationships.
✅ Allocation % Display: Converts score into suggested portfolio allocation.
✅ Background Highlighting: Green shades for bullish conditions, red shades for bearish.
✅ Customizable Table Position: Choose between Top Right, Top Center, Bottom Right, or Bottom Center.
✅ Toggleable EMAs: Show/Hide 21 EMA, 50 EMA, and 100 EMA directly from indicator settings.
✅ Simple & Intuitive: One glance at the chart tells you trend strength and suggested allocation.
📈 How It Works
Score Calculation:
Price above an EMA = +1, below = -1
Faster EMA above slower EMA = +1, else -1
Maximum score = +6, minimum = -6
Allocation Mapping:
+6 → 100% allocation
+4 to +5 → 100% allocation
+2 to +3 → 75% allocation
0 to +1 → 50% allocation
-1 to -2 → 30% allocation
-3 to -4 → 20% allocation
-5 to -6 → 10% allocation
Visual Output:
Table shows SCORE + Allocation %
Background color shifts with score (green for bullish, red for bearish)
⚠️ Disclaimer
This indicator is for educational purposes only. It does not constitute financial advice. Always backtest and combine with your own analysis before making trading decisions.
+6 Score = 100% allocation (strong bullish trend)
-6 Score = 10% allocation (strong bearish trend)
Scores in between represent intermediate trend strength.
📌 Key Features
✅ Scoring Model: Evaluates price vs. EMA alignment and EMA cross relationships.
✅ Allocation % Display: Converts score into suggested portfolio allocation.
✅ Background Highlighting: Green shades for bullish conditions, red shades for bearish.
✅ Customizable Table Position: Choose between Top Right, Top Center, Bottom Right, or Bottom Center.
✅ Toggleable EMAs: Show/Hide 21 EMA, 50 EMA, and 100 EMA directly from indicator settings.
✅ Simple & Intuitive: One glance at the chart tells you trend strength and suggested allocation.
📈 How It Works
Score Calculation:
Price above an EMA = +1, below = -1
Faster EMA above slower EMA = +1, else -1
Maximum score = +6, minimum = -6
Allocation Mapping:
+6 → 100% allocation
+4 to +5 → 100% allocation
+2 to +3 → 75% allocation
0 to +1 → 50% allocation
-1 to -2 → 30% allocation
-3 to -4 → 20% allocation
-5 to -6 → 10% allocation
Visual Output:
Table shows SCORE + Allocation %
Background color shifts with score (green for bullish, red for bearish)
⚠️ Disclaimer
This indicator is for educational purposes only. It does not constitute financial advice. Always backtest and combine with your own analysis before making trading decisions.
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.
Algogram
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.
Algogram
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.