Find High and Low during set period of Time

14:48 JH: I want to find the high and low from time [a] to time [b] = one hour ....12 five minute bars I want this high and low to be plotted a horizontal line for the rest of the session

14:48 Ensign Howard: ok 1 moment

 

14:52 Ensign Howard: This is a generalized form for the 2 times

14:52 Ensign Howard: First time will be Line A Number value, which in example is 1000. 2nd time will be Line D which is 1100 in this example

14:52 JH: thanks..i will try this

14:53 Ensign Howard: Example can be used on any intra-day, or tick based chart and is not dependent on 12 bars which would only work for 1 hour on a 5 min chart. When time is ahead of 1000 we will reset the bar counter in [250] to zero on Line B and abort plotting on Line C

14:53 Ensign Howard: Line D will test for 2nd time boundary and increment the counter on Line E

14:54 Ensign Howard: Line F will skip finding different High and Low values when the time is after 2nd boundary

14:54 Ensign Howard: LIne G and H will find the HH and LL since the first time boundary, using the bar counter in [250]

14:55 Ensign Howard: Line I and J plot the HH and LL values saved by G and H for all times after the 1st boundary.

14:57 Ensign Howard: Line F number can be blank

14:57 Ensign Howard: let me explain Line E..

14:58 Ensign Howard: On the IF statement it has 3 parameters: Flag, #+1, and #

14:58 Ensign Howard: The test is the first parameter of Flag, which is the content of the Read GV in [1] which was saved by Line D as a time test

14:59 Ensign Howard: When the Flag is True, the statement returns the 2nd parameter which is the number field +1, and the number field has the reference to our GV variable 250. So the counter in 250 is returned +1, or incremented.

14:59 Ensign Howard: Then the statement stores this result in the Write GV or right back in [250]

15:00 Ensign Howard: When the flag is False, it returns the 3rd parameter, which is just the number field, or [250].

15:00 Ensign Howard: So when True the content of 250 is incremented and when it is False the content of 250 is read and rewritten unchanged.

Last updated 01/02/2009