Trendline in iHighest between 2 specific times

 

Hello.


I have been trying to modify the code with iHighest with no luck. I'm trying to find the highest point between 2 specific times (example: highest price between 1200 - 1700) - not last "x" bars, etc.


Once it identifies the highest price, I'm trying to get it to draw a horizontal line making it easy for me to see. This would also apply to the lowest price as well. The line would stay active until the next time it rolls around to 1700 (next day).


I have been trying the iHighest - I figure that's what I can base the code off of with what I'm trying to accomplish but not 100$ sure.


Any help would be appreciated. Thanks.

 

Hi

I think you need to start with iBarShift() to find the bar numbers for the times you are interested in. Then use iHighest().

iHighest() returns the bar with the highest value between the given bars.

You then need to use that result in iHigh(), for example, to get the actual price.

Jellybean

 

Okay thanks Jellybean.

Will give that a shot. Thanks for taking the time to help.