Skip to content
All library documents

Checking and Normalizing Price Values on Chart Objects

Article MQL5 code base

Summary

This document describes an auxiliary chart indicator that reports the selected graphical object's type, anchor dates and values, and the number of decimal places in those values. It covers objects in both the main chart and indicator subwindows, including trend lines, channels, Fibonacci drawings, and shapes. The reported precision can help reveal anchor values that have not been normalized to the intended price precision.

The examples discuss why a line that visually appears to match a quote's precision may still contain extra decimal places internally. For programmatically created objects, the author recommends checking how the creating code normalizes values. For manually drawn objects, reopening and confirming the anchor value in the object's properties is presented as a way to normalize it; a separate utility is also mentioned for rounding selected object types. The document is a tool description with illustrative cases, not a trading method or a measured evaluation of the indicator's accuracy.

Key ideas

  • The indicator displays the type, anchor values, dates, and decimal precision of a clicked chart object.
  • It can inspect graphical objects in both the price chart and indicator subwindows.
  • Displayed precision can expose anchor values that are not normalized as expected.
  • For programmatic objects, normalization should be checked in the code that creates them.
  • Manually drawn object values can be normalized through their properties dialog.

Tags

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