I don't know if I've understood what you're
looking for, but you can use PRICE_MEDIAN instead of PRICE_CLOSE. You can see the price constants available here.
Best regards.

Price Constants - Indicator Constants - Constants, Enumerations and Structures - MQL4 Reference
- docs.mql4.com
Price Constants - Indicator Constants - Constants, Enumerations and Structures - MQL4 Reference

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
Hi Guys,
I need to get the Moving Average value at the previous candle. I want to extract the value at the middle of candle.
Currrently I have this code (MQL4):
The returned value of the code execution is not the same as I can see throught the chart. When I draw a vertical line at the chart it goes to the middle of candle automaticaly. I have checked the value at the MA line and it's not the same or slighly diferent.
Which direction should I take?