Hallo!
I have a C++ problem.
I want to develop my own EMA.
How can I get the previous EMA?
I have this:
TIndexBuffer ema;
And in the Calculate function:
double GetPrevEma;
GetPrevEma=ema.GetValue(index+1);
But this doesn't work.
How can I get the value of a buffer from the previous bar?
Many thanks.
Best Regards.
Getting a buffer value from the previous bar
-
- Posts: 905
- Joined: Sat Jul 11, 2009 10:54 am
I'm not C++ programmer, but i'd recommend to change "ema.GetValue(index+1)" with "ema[index+1]" maybe these constructions are same but i'm not sure.
can you post the whole code of your indicator? are you sere that buffer is populated correctly?
can you post the whole code of your indicator? are you sere that buffer is populated correctly?
Check our other product here:
http://www.forexcopier.com
http://www.forexcopier.com
Who is online
Users browsing this forum: No registered users and 22 guests