Applying the Equity graph on the chart – indicator for MetaTrader 4

  • A+
category:MT4 INDICATORS

Suppose that there is some data, which is used as the basis for plotting a diagram, for example, a chart of five equities.

Applying the Equity graph on the chart - indicator for MetaTrader 4

The source data is stored in the equity.csv file.

Applying the Equity graph on the chart - indicator for MetaTrader 4

And this data needs to be viewed on the price chart of some currency pair. And not in a separate window, but right in the window that displays the instrument price. This indicator example is written for such a case. It displays 5 charts of the average equity for five groups with different values of Money Compounding. First, compile the indicator and attach it to the daily chart (the equity.csv file must be placed to experts\files\..). Nothing appears on the chart, this is normal, as the scale of the chart and the scale of the values read from the file have great differences.

After that, comment out one line in the indicator code, and, conversely, uncomment the other one, then press F5 (compile). Now there is a normal picture.

Thus, the terminal was "deceived" and forced to scale the indicator according to the current price range. This trick is only possible in case the indicator is told to be drawn in a separate window.
Receive this picture.

Comment

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: