Hi,
I am trying to store highest and lowest values of a wave ( from zig zag) into buffers.
I am then comparing if it is a highest high and highest low from its previous then alert will display that it is an up trend but problem when I compare them I am not getting any alert, I think I am not able to check highest high or lowest low conditions.
Code:
For eg. :
Buff_High stores highest value of the trend in the buffer name: Buff_High[i] and Buff_Low store lowest value of the trend in buffer: Buff_Low[i]. Then how to compare this highest or lowest values store in these buffer with just previous stored buffers.
My condition is not working:
if ( (Buff_High[i] > Buff_High[i+1]) && ( Buff_Low[i] > Buff_Low[i+1]) )
{
Alert ( " It is an up trend");
}
Please advise how to write correct condition for checking. I have tried to search every thing online but not able find the solution.
Thanks.