I want to say current value minus previous value is equal to or more/less than a certain value. How do I do it
marasha: How do I do it
Exactly as you said. Get the current, get the previous, if( MathAbs( current - previous ) < certain ) doWhatever.
An example of how to create an indicator handle in MQL5 and how to get the value of the 'Stochastic' indicator:
An example of get values from the iStochastic indicator
How to start with MQL5
- 2020.04.09
- www.mql5.com
This thread discusses MQL5 code examples. There will be examples of how to get data from indicators, how to program advisors...
Why don't you use CopyBuffer function?
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register