Skip to content
All library documents

A Configurable Price-Difference Indicator for Two Trading Symbols

Article MQL5 code base

Summary

This indicator plots the price difference between two chosen trading symbols, with AUDUSD and NZDUSD given as defaults. Each symbol has a weight parameter, allowing the displayed spread to reflect a weighted difference rather than only an unadjusted subtraction. The description also explains that setting the second symbol’s weight to negative one produces a sum, which it presents as a way to explore negatively correlated symbols in pairs trading.

The document explains the inputs and references an accompanying chart with both underlying price series and the indicator, but provides no formula details beyond the parameter description, trading rules, performance evidence, or risk controls. It does not explain how to choose weights, normalize prices, handle differing volatility, or validate a relationship between symbols. The tool is best understood as a visualization aid for comparing two instruments; a plotted spread by itself does not establish a tradable or stable statistical relationship.

Key ideas

  • The indicator charts a price difference between two configurable trading symbols.
  • Separate weight inputs control the contribution of each symbol to the calculation.
  • The description says a negative weight for the second symbol can create a sum for examining negatively correlated pairs.
  • The accompanying chart shows each underlying series alongside the calculated indicator.
  • The document gives no method for choosing weights or evidence that the plotted relationship is stable or profitable.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.