Need Help, SMA20-Mql5 EA

 

Hello Friends, my coding ability in mql5 is very limited. I have been trying to get the SMA20 value to use in another function but cannot. Can anyone please help!

The attached code compiles well but does not give me the price value of sma20 as Comment on screen. I just can't figure out what I am doing wrong!!

Files:
 

It's the value of 20 last candles combined and that result divided by the number of candles.

But you can also look here:

https://www.mql5.com/en/articles/81

Migrating from MQL4 to MQL5
Migrating from MQL4 to MQL5
  • www.mql5.com
Practical Application Of Databases For Markets Analysis Working with data has become the main task for modern software - both for standalone and network applications. To solve this problem a specialized software were created. These are Database Management Systems (DBMS), that can structure, systematize and organize data for their computer...
Reason: