Download MetaTrader 5

previous 1,2,3 bars high should be greater than to previous 4,5,6 bars low

To add comments, please log in or register
rajre72
24
rajre72  

hi iam started learnig to write a code

need to write this 

if previous 1,2,3 bars highest of high value should be higher than the previous 4,5,6, bars lowest of low .

anybody help me !!

whroeder1
15574
whroeder1  
rera7: iam started learnig to write a code
You have only three choices: Search for it, learn to code it, or pay someone. We're not going to code it FOR you. We are willing to HELP you when you post your attempt (using SRC) and the nature of your problem.
Keith Watford
Moderator
10566
Keith Watford  
rera7:

hi iam started learnig to write a code

need to write this 

if previous 1,2,3 bars highest of high value should be higher than the previous 4,5,6, bars lowest of low .

anybody help me !!

Look in the Editor help documentation for High and iHigh
rajre72
24
rajre72  

thanks for your suggestions. after going through iHighest,iLowest  functions .. this is what i got

    > if { previous 1,2,3 bars highest of high value > previous 4,5,6, bars lowest of low }

if( High[iHighest(NULL,0,MODE_HIGH,3,1)] > Low[iLowest(NULL,0,MODE_LOW,3,4)])

 is this correct ?  added 4 in above function ,so it will start from previous fourth bar!

Keith Watford
Moderator
10566
Keith Watford  
rera7:

thanks for your suggestions. after going through iHighest,iLowest  functions .. this is what i got

    > if { previous 1,2,3 bars highest of high value > previous 4,5,6, bars lowest of low }

 is this correct?

Looks correct to me
rajre72
24
rajre72  
Thank you sir.
To add comments, please log in or register