Store swing high & low value in buffer

If you need an Indicator or Signal developed or translated from other language, please post all Indicator development REQUESTS to this section here.

Moderator: admin

Store swing high & low value in buffer

Postby aryan116 » Mon Jul 16, 2018 11:12 am

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.
aryan116
 
Posts: 7
Joined: Thu Jul 12, 2018 4:12 pm

Return to Indicator and Signal Requests

Who is online

Users browsing this forum: Bing [Bot], captainjacksparrow and 11 guests