OPEN-SOURCE SCRIPT

[ AlgoChart ] - Compare Market

Indicator Description:

This indicator allows you to display a second asset, selectable from the input panel, in a separate window. Plotted on the same time scale as the first asset but with a distinct price scale, the indicator enables analysis of the relationships and relative movements of two financial instruments. It’s an ideal tool for understanding whether two assets move in a correlated or divergent manner.

snapshot

Key Features:

  • Multi-Asset Comparison: Display two assets simultaneously to compare their trends.
  • Custom Scale: Each asset uses its own price scale, making comparative analysis easier.
  • Intuitive Interface: Easily select the second asset through the input panel.


Operational Applications:

  • Spread Trading: Identify optimal moments to execute spread trades when two highly correlated instruments move in opposite directions.
  • Supply & Demand: Pinpoint zones of interest on both assets, increasing the validity of support and resistance areas.
  • Exposure Reduction: Monitor instruments that move similarly to avoid exposing the portfolio in identical directions, thereby reducing the risk of double losses.


snapshot

Additional Features:

  • Candle Color Change: When a directional divergence occurs between the two assets, the candles change color to highlight the event.
  • Customizable Notifications: Receive instant alerts when a divergence occurs, allowing you to act promptly.
candlestickanalisysCandlestick analysisChart patternscomparecandlesportfolio-allocationspreadtradingTrend Analysis

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?


Also on:

Disclaimer