If I remember correctly, when they introduced OnCalculate to MQL4, they seemed to copy across from 5 but I believe that
const long &volume[], const int &spread[])
didn't return any value.
I haven't checked since.
For the spread I just use Ask-Bid in my calculations which of course gives you the decimal value.
Thank you, that worked great.

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
Hello,
How do I display the current spread as a value in my custom indicator? I use the following code, but it doesn't display.
I am just starting to learn to make indicators for MT4. I noticed some values (like tick_volume) will display, and others like this will not.
I am fairly experienced in coding C / C++ for microcontrollers, but MT4 is new to me.