Hi all,
I asked this question in another forum but it was moved, I think it was meant to be moved to this one but instead it got buried in another thread.
I know a little about MQL programming but not enough to solve this problem!
I'm trying to create an indicator with two buffers.
The values held in the first buffer is simply the O+H+L+C of the current bar divided by 4, no problems there.
The second buffer is where I'm having the problem. Basically the second buffer holds the value of buffer1 on the previous bar, added to the value of buffer2 on the previous bar, divided by 2.
That's not much of a problem either, except when you count back to the very first bar in the chart there is no previous bar to take data from. For that bar buffer2 needs a starting value, which is the open of that bar.
Basically I don't know how to set that up and would appreciate any help. Thanks
