Doing calculations with Buffer from "ExponentialMAOnBuffer"


Hey! Thanks for taking some time out of your day to read my question. 

So in my script I am calculating a few EMA's. With these EMA values I have to do some further calculations, but how would I do calculations with these values that are stored inside this array (buffer)? 

input int UMAPeriod  = 9;     // UMA period

double  UMAX_Buffer[],                   UMA_Buffer[];




These are the lines code for the UMA -> UMAX_Buffer. 

UMA is defined in a different script, but it does have variables. So the Array is Filled it just doesn't show that here.

But how would I do calculations with the latest value from this buffer? Could I do something like this?:


But I think it still isn't possible to do something like this for example: 

double  Example         =       UMAX_Buffer + 10;

These might be dumb questions, but I can't figure them out. 

Thanks in advance! 

Have a great rest of your day

Nagisa Unada  
#include  <MovingAverages.mqh>
//--- input parameters
input int      UMAPeriod  = 9;     // UMA period
//--- indicator buffers
double         UMAX_Buffer[];
//| Custom indicator initialization function                         |
int OnInit()
   //--- indicator buffers mapping
   SetIndexBuffer(0, UMAX_Buffer, INDICATOR_DATA);

//| Custom indicator iteration function                              |
int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
        ExponentialMAOnBuffer(rates_total, prev_calculated, UMAPeriod, UMAPeriod, UMA_Buffer, UMAX_Buffer);  
        //--- return value of prev_calculated for next call

I don't know how to get data on UMA_Buffer. Add it by yourself.