iHighest/iLowest

 

Hello I would like to use the iHighest in my study and would like to know if this statement is valid please.

double bMaxHigh = iHigh[iHighest(NULL, PERIOD_H1, MODE_HIGH, 10, 1)];
if (SellExists && Low[1] > bMaxHigh) 
{ 
   CloseThisLoser(); 
}

Thank you kindly.

 
TraderJoe:

Hello I would like to use the iHighest in my study and would like to know if this statement is valid please.

Thank you kindly.


Low[1] can never be higher then bMaxHigh if the period is the same
 

This is wrong, check the documentation for iHigh() and High[]

double bMaxHigh = iHigh[iHighest(NULL, PERIOD_H1, MODE_HIGH, 10, 1)];
 

just because the documentation is vague and incomplete does not mean I did not read it several times before I asked.

 
TraderJoe:

just because the documentation is vague and incomplete does not mean I did not read it several times before I asked.


Print("bMaxHigh  ",bMaxHigh," Low1  ",Low[1]);  
check it
 
deVries:

check it

will do thanks.
 
TraderJoe:

just because the documentation is vague and incomplete does not mean I did not read it several times before I asked.

Perhaps, but there can be no doubt that iHigh() is not used with square braces [ ] perhaps you meant High[ ] ?
 
  1. RaptorUK:
    Perhaps, but there can be no doubt that iHigh() is not used with square braces [ ] perhaps you meant High[ ] ?

    double bMaxHigh = iHigh[iHighest(NULL, PERIOD_H1, MODE_HIGH, 10, 1)];
    Most likely he is not running on a H1 chart (or he would have used iHighest(NULL, 0...))
  2. Break apart the code so you can see the differences
    int    iHH_H1   = iHighest(NULL, PERIOD_H1, MODE_HIGH, 10, 1); // Relative to the H1 chart
    double bMaxHigh = iHigh(NULL, PERIOD_H1, iHH_H1);              // High on the H1 chart.
    

 
WHRoeder:
  1. RaptorUK:
    Perhaps, but there can be no doubt that iHigh() is not used with square braces [ ] perhaps you meant High[ ] ?

    Most likely he is not running on a H1 chart (or he would have used iHighest(NULL, 0...))

Sure, but then he would have done this . . . .

double bMaxHigh = iHigh ( NULL, PERIOD_H1, iHighest(NULL, PERIOD_H1, MODE_HIGH, 10, 1) );
 
RaptorUK:

Sure, but then he would have done this . . . .


We would do that but if you see to his other topics then this guy is learning by trieing something....

if it fails then trie with a little change..... First learning is the most difficult you have to go through it...

 
deVries:


We would do that but if you see to his other topics then this guy is learning by trieing something....

if it fails then trie with a little change..... First learning is the most difficult you have to go through it...

Yes I agree, but I got this response in my suggestion to look at the documentation . . . .

"just because the documentation is vague and incomplete does not mean I did not read it several times before I asked."

Reason: