Hello All,
I`m new at MQL5 forum, and I`m trying to convert the SAFEZONE indicator from MT4 to MT5, but I`m facing some issues, like some times the indicator is showed then left the screen.......
The original code for MT4 I found at https://www.mql5.com/pt/code/7514
Based on MQL5 documentation.... I tried to convert...... and the code is below.
Some one could help to identify the issues......
I trying to Converto the iMA code and I do not know how I add the shift value to MT5.....
iMA MT4 code
iMA MT5 code that is missing the last var from MT4 - SHIFT
Hi,
treatment of indicators is different in MT5.
One idea /proposition here using the Standard Library:
#include <Indicators/Trend.mqh> CiMA MA_ind; MA_ind.Create(Symbol(),0,EMALength,0,MODE_EMA,PRICE_CLOSE); ... double EMA0=MA_ind.Main(shift); double EMA1=MA_ind.Main(shift+1); double EMA2=MA_ind.Main(shift+2);
You can read also https://www.mql5.com/en/articles/81
Matthias/Bobcat
- 2010.05.17
- Sergey Pavlov
- www.mql5.com
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello All,
I`m new at MQL5 forum, and I`m trying to convert the SAFEZONE indicator from MT4 to MT5, but I`m facing some issues, like some times the indicator is showed then left the screen.......
The original code for MT4 I found at https://www.mql5.com/pt/code/7514
Based on MQL5 documentation.... I tried to convert...... and the code is below.
Some one could help to identify the issues......
I trying to Converto the iMA code and I do not know how I add the shift value to MT5.....
iMA MT4 code
iMA MT5 code that is missing the last var from MT4 - SHIFT