Simply subtract the buffer values of each of the two indicators and scale the value to points or pips.
First show your code attempting that and we will then guide you with any difficulties you need to resolve.
Also, in the future, post in the correct section at the end of the forum for MT/MQL4 related issues: MQL4 and MetaTrader 4
Difference divided by size of a PIP. You asked for every chart, so you must define a PIP for every chart.
PIP, Point, or Tick are all different in general.
What is a TICK? - MQL4 programming forum (2014)
Unless you manually adjust your SL/TP for each separate symbol, using Point means code breaks on 4 digit brokers, exotics (e.g. USDZAR where spread is over 500 points), and metals. Compute what a PIP is and use it, not points.
How to manage JPY pairs with parameters? - MQL4 programming forum (2017)
Slippage defined in index points - Expert Advisors and Automated Trading - MQL5 programming forum (2018)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
How do I get the difference in pips between the 5EMA and 10EMA in every chart. That is:
5EMA - 10EMA in pips (that works in every chart)?
This is for an MT4 expert advisor.
Thanks in advance.