OPEN-SOURCE SCRIPT
Updated

Normalized Price Comparison

Normalized Price Comparison Indicator Description

The "Normalized Price Comparison" indicator is designed to provide traders with a visual tool for comparing the price movements of up to three different financial instruments on a common scale, despite their potentially different price ranges. Here's how it works:

Features:
Normalization: This indicator normalizes the closing prices of each symbol to a scale between 0 and 1 over a user-defined period. This normalization process allows for the comparison of price trends regardless of the absolute price levels, making it easier to spot relative movements and trends.
Crossing Alert: It features an alert functionality that triggers when the normalized price lines of the first two symbols (Symbol 1 and Symbol 2) cross each other. This can be particularly useful for identifying potential trading opportunities when one asset's relative performance changes against another.
Customization: Users can input up to three symbols for analysis. The normalization period can be adjusted, allowing flexibility in how historical data is considered for the scaling process. This period determines how many past bars are used to calculate the minimum and maximum prices for normalization.
Visual Representation: The indicator plots these normalized prices in a separate pane below the main chart. Each symbol's normalized price is represented by a distinct colored line:
Symbol 1: Blue line
Symbol 2: Red line
Symbol 3: Green line

Use Cases:
Relative Performance Analysis: Ideal for investors or traders who want to compare how different assets are performing relative to each other over time, without the distraction of absolute price differences.
Divergence Detection: Useful for spotting divergences where one asset might be outperforming or underperforming compared to others, potentially signaling changes in market trends or investment opportunities.
Crossing Strategy: The alert for when Symbol 1 and Symbol 2's normalized lines cross can be used as a part of a trading strategy, signaling potential entry or exit points based on relative price movements.

Limitations:
Static Alert Messages: Due to Pine Script's constraints, the alert messages cannot dynamically include the names of the symbols being compared. The alert will always mention "Symbol 1" and "Symbol 2" crossing.
Performance: Depending on the timeframe and the number of symbols, performance might be affected, especially on lower timeframes with high data frequency.

This indicator is particularly beneficial for those interested in multi-asset analysis, offering a streamlined way to observe and react to relative price movements in a visually coherent manner. It's a powerful tool for enhancing your trading or investment analysis by focusing on trends and relationships rather than raw price data.
Release Notes
Added built in levels
Release Notes
Added feature*

Performance Difference Indicator:


We've introduced an innovative feature to the "Normalized Price Comparison" indicator that enhances your ability to analyze and interpret market trends through a new visual metric. This feature adds:

Performance Difference Histogram: A histogram located at the bottom of the indicator panel that dynamically illustrates the relative performance between two normalized price series (Composite Symbol 1 and Composite Symbol 2). This histogram represents the difference between these normalized values, adjusted by the movement of the actual pair symbol (Symbol 3). The bars of the histogram are:
Green when Composite Symbol 1 is outperforming or increasing more than Composite Symbol 2, considering the adjustment by the actual pair's price movement.
Red when Composite Symbol 2 is outperforming or showing stronger growth than Composite Symbol 1, again with the adjustment for the actual pair's performance.
Directional Indicator: Accompanying the histogram, a simple yet effective directional arrow ('↑' or '↓') appears at the bottom of the chart. This visual cue:
↑ Indicates when the performance of Composite Symbol 1 is leading.
↓ Indicates when Composite Symbol 2 is taking the lead in performance.

This feature provides a quick, at-a-glance understanding of which normalized price series is gaining more ground relative to the other, while also considering the broader market context via the actual pair's movement. It's particularly useful for traders looking to spot divergences or confirmations between different market indices or assets, offering insights into which market might have a stronger influence or "lead" in current market conditions. This can help in decision-making for trading strategies, asset allocation, or simply in understanding market dynamics more intuitively.
Release Notes
*interface update
Release Notes
bug fix*

Disclaimer