I have a few questions...
Do I have to use a cycle to get access the past bars or is the function ArrayMaximum all that is needed?
Also if someone could provide an example it would be appreciated..
ArrayMaximum will work. Just remember it returns the index with the highest value, not the actual value.
Examples in the documentation (easier to follow in the MT4 documentation):
the example provides a set array with constant values called num_array:
Print("Max value = ",num_array[maxValueIdx]," at index=",maxValueIdx);
I've tried replacing num_array with my buffer and there was no result.
What could I be doing wrong?
I've tried replacing that with my buffer and there was no result.
Also, if you expect help you need to post at least some of your code i.e. the section you are having trouble with.
Posting up the example from the help files is no use - the example code works so there must be a problem with your implementation.