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
I am new to MQL4 programming, and am trying to take lots of little steps to get acquainted with the syntax and different types of programs. I tried to program a simple moving average crossover indicator, but the lines drawn by the indicator do not have the same values for identical MA's created with the Moving Averages indicator that comes with MetaTrader 4. I am sure there is a simple solution for this, but any feedback is appreciated. Here is a copy of the code, preceded with a picture illustrating the issue. The arrow points to the custom indicator, which draws the blue and red moving averages. The lines above the blue and red are standard Moving Average indicators with a short EMA with P=50 and a long SMA with P=100:
Thanks for any help!