EMA Hierarchy Score V.1.0
Purpose
The EMA Hierarchy Score indicator assesses the relative positioning of multiple Exponential Moving Averages (EMAs) for a financial asset. This tool provides insights into trend strength by calculating ideal and non-ideal configurations of EMAs, allowing for effective interpretation when used alongside standard EMA charts.
Variables and Inputs
The indicator organizes a set of EMAs and other metrics into a hierarchy for scoring:
* Primary Variables (A–J):
A: Close price
B: Open price
C: Previous close price
D to J: EMAs of configurable periods (5, 9, 13, 21, 26, 52, 100).
* User Inputs:
* Customizable periods for each EMA, allowing users to adjust the indicator’s sensitivity.
* Customizable period and standard deviation multiplier for Bollinger Bands, enabling further control over the indicator’s analysis.
Mathematical Method
The EMA Hierarchy Score calculates how closely the current EMA structure aligns with an “ideal” configuration through a structured scoring system:
1- Hierarchy Scoring:
* Ideal Order: Defined as A > B > C > D > E > F > G > H > I > J, representing a strong upward trend where each EMA progressively increases.
* Non-Ideal Order: Defined as J > I > H > G > F > E > D > C > B > A, indicating a weak or downward trend where each EMA progressively decreases.
* Optimal Order: Calculated based on achieving maximum alignment with the ideal configuration for each EMA across the chosen period.
* Sub-Optimal Order: The least-aligned structure across the same period.
2- Score Calculation:
* The indicator calculates a score by comparing all EMA pairs in values. For each comparison, a score increment of +1 (ideal) or -1 (non-ideal) is applied.
* The final score reflects the EMA configuration’s deviation from the ideal order:
- Positive Score: Indicates closer alignment with the ideal structure.
- Negative Score: Indicates deviation toward a non-ideal structure.
3- Smoothed and Signal Lines:
* A smoothed score is created using a Simple Moving Average (SMA) of the raw hierarchy score.
* A signal line (an SMA of the smoothed score) further aids in tracking directional shifts in the score.
4- Trend Labels and Bollinger Bands:
* Trend Labels: Display "UP" or "DOWN" based on the smoothed score’s relationship to the signal line.
* Bollinger Bands: Plotted around a selected source (smoothedLine, signalLine, or score) to analyze score volatility and deviations from the mean. The period and standard deviation multiplier for Bollinger Bands are user-configurable.
Result Definition
The Ideal and Non-Ideal Scores represent the upper and lower bounds of achievable configurations, ensuring the score does not exceed these values.
1- Ideal and Non-Ideal Result:
* Calculated based on how closely the current EMA configuration follows the “ideal” ascending or descending order.
* Ideal Score: Defined as +165, representing perfect alignment with the ideal configuration.
* Non-Ideal Score: Defined as -165, indicating full alignment with the descending, non-ideal structure.
* The score is bounded by these values and will not go above or below this range.
2- Optimal and Sub-Optimal Scores:
* Optimal Score: The highest score over the selected scoring period, calculated with the same period as the Bollinger Bands. Using consistent periods reinforces the reliability of the score by aligning with the period already used to gauge volatility.
* Sub-Optimal Score: The lowest score over the same period, capturing points of minimal alignment with the ideal order.
Interpretation and Analysis
1- Use with EMA Charts:
* This indicator is designed to be used alongside EMA charts, as its results provide insights into the relative order of EMAs and their alignment with trend strength.
* The EMA Hierarchy Score interprets the underlying EMA structure, offering additional context on whether current trends are aligned with optimal or non-optimal EMA configurations.
2- Ideal and Non-Ideal Analysis:
* A positive EMA Hierarchy Score indicates an orderly, ideal upward trend, suggesting stronger alignment with the ideal structure.
* A negative score signals a potential downward trend or deviation from the ideal structure.
3 - Trend Indicators and Bands:
* Trend Labels: The "UP" and "DOWN" labels offer real-time feedback on trend direction shifts, based on the smoothed score and signal line relationship.
* Bollinger Bands: Visualize the range of score fluctuations, helping to identify breakout or breakdown points.
4 - Optimal and Sub-Optimal Scores:
* Use the Optimal Score to understand peak trend alignment and Sub-Optimal Score to spot potential reversal or correction zones.
* A consistently high score over time indicates trend stability, while variations may suggest instability.
Quick Reference Table
The table displayed at the top right provides an at-a-glance view of key metrics:
* Ideal and Non-Ideal Score: Fixed at ±165 to represent the calculated ideal and non-ideal configuration.
* Optimal and Sub-Optimal Scores: Show maximum and minimum scores over the scoring period, color-coded green for positive and red for negative values.
This concise table helps users quickly assess indicator values, reducing the need to interpret multiple chart lines and making it easier to understand overall trend strength.
Disclaimer
The EMA Hierarchy Score V.1.0 is a technical analysis tool designed to assist in understanding the alignment and strength of trends as defined by EMA configurations. This indicator does not constitute investment advice, nor does it make specific recommendations for buying or selling assets. Users should consult with a financial advisor before making any trading decisions, as past performance or technical signals do not guarantee future results. The developers of this indicator disclaim all liability for potential financial losses arising from reliance on this tool. Users assume full responsibility for interpreting and applying the indicator’s outputs in their investment decisions.