Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 949

 
I can't figure out how to do it. Need to bring back the time of the candle whose high is yesterday's high. Thank you!
 
001:
I can't figure out how to do it. Need to bring back the time of the candle whose high is yesterday's high. Thank you!
iHighest to the rescue.
 
evillive:
iHighest to help.
And how is it possible to get the time back with this function?
 
001:
And how is it possible to return the time using this function?
This function is used to get the bar number. And it is very easy to get the time if you know the bar number.
 
Thank you! I'll give it a try.
 
AlexeyVik:
Show me a line for comparison, I saw it but a long time ago and don't remember, I think I just finished i and no problem. But I repeat, it was a long time ago and I may not remember correctly.
LastHigh=High[Highest(NULL,0,MODE_HIGH,i+1)];

LastLow=Low[Lowest(NULL,0,MODE_LOW,i+1)];

Thanks for the tip. This is probably the easiest comparison. But on the other hand, if the function is simply renamed, the missing argument must be "0":

LastHigh=High[Highest(NULL,0,MODE_HIGH,i+1,0)];

LastLow=Low[Lowest(NULL,0,MODE_LOW,i+1,0)];

This makes no sense, because we are dealing with arrays of indicators. I.e. it looks for the highest/lowest bar for the entire array of bars, from 0 to rates_total (Bars). Direct idiocy. At least at first glance. And at second glance.

That's what made me think it was something else.

And on the third, no need to "look for help in the desert". If I had not been lazy, and chiseled the context, I would have reached the truth a long time ago.

I just thought that this forum is sometimes visited by happy creators who do not cost us ignorant kittens to poke their noses in the right direction. But apparently I was not lucky, I did not catch the Creator's apparition.

 
incred:
LastHigh=High[Highest(NULL,0,MODE_HIGH,i+1)];

LastLow=Low[Lowest(NULL,0,MODE_LOW,i+1)];

Thanks for the tip. This is probably the easiest comparison. But on the other hand, if the function is simply renamed, the missing argument must be "0":

LastHigh=High[Highest(NULL,0,MODE_HIGH,i+1,0)];

LastLow=Low[Lowest(NULL,0,MODE_LOW,i+1,0)];

This makes no sense, because we are dealing with arrays of indicators. I.e. it looks for the largest/smallest bar for the entire array of bars, from 0 to rates_total (Bars). Direct idiocy. At least at first glance. And at second glance.

That's what made me think it was something else.

And on the third, no need to "look for help in the desert". If I didn't get lazy, but pecked at the context, I'd have got to the truth by now.

I just thought that this forum is sometimes visited by happy creators who do not cost us ignorant kittens to poke their noses in the right direction. But apparently I was unlucky, I did not catch the Creator's apparition.

Lazybones are unlucky.
 
incred:
LastHigh=High[Highest(NULL,0,MODE_HIGH,i+1)];

LastLow=Low[Lowest(NULL,0,MODE_LOW,i+1)];

Thanks for the tip. This is probably the easiest comparison. But on the other hand, if the function is simply renamed, the missing argument must be "0":

LastHigh=High[Highest(NULL,0,MODE_HIGH,i+1,0)];

LastLow=Low[Lowest(NULL,0,MODE_LOW,i+1,0)];

This makes no sense, because we are dealing with arrays of indicators. I.e. it looks for the largest/smallest bar for the entire array of bars, from 0 to rates_total (Bars). Direct idiocy. At least at first glance. And at second glance.

That's what made me think it was something else.

Even though you give examples of one obsolete function, you can understand that the last 0 means from which bar the maximal high or low is searched for.

It is hardly possible to find the description of the obsolete Highest() or Lowest() functions, but in my opinion, not much has changed. I think that it's an error tolerance gimmick in builds up to 600, no parameter, so 0...

 
AlexeyVik:

I think it's an error tolerance gimmick in builds up to 600 no parameter, so 0...

It's not about bugs. It's just that some of the arguments can be omitted, and their values become defaults. And if Highest() == iHighest(), then there is 1 more argument, and if it is missing, then it = 0 (by default). This is in all builds.
 
Anyway, it's okay, I'll figure it out, I was just bored. The code is probably, I apologise, partly idiotic.
Reason: