Hello,
i just started coding MQL4, so I have many problems with it
I just want create an indicator which shows/calculate the following:
"1. Graph" = Mom(3) + Mom(5) + Mom(7)
-This should show the speed of change.
In the second window should be shown the following:
"2. Graph" = Mom(Mom(3)) + Mom(Mom(5)) + Mom(Mom(7))
-This should show the acceleration of change.
Later, I need those two calculations for an EA, too. But first I want to get them drawed in an indicator.
Can someone help me?
Here I started to calc the 3-Car-Momentum, but the graph doesn´t work
=========================================
int pos=Bars-counted_bars;
double dMedian ,dMedian1, dResult;
//----main calculation loop
while(pos>=0)
{
dMedian = (High[pos] + Low[pos]) / 2; //medianPrice
dMedian1 = (High[pos+3] + Low[pos+3]) / 2;
dResult = dMedian*100/dMedian1; //Momentum of medianprice
ExtMapBuffer1[pos] = dResult; //fill buffer with results
pos--; //calc next bar
}