Adding Date Conditions to Highest(n) & Lowest(n)
Forums › ProRealTime English forum › ProBuilder support › Adding Date Conditions to Highest(n) & Lowest(n)
- This topic has 6 replies, 2 voices, and was last updated 9 years ago by
liammaher11.
-
-
09/27/2016 at 9:54 AM #13791
Hi
Is it possible to add a date function into the highest & lowest code? To add a highest or lowest indicator between two sets of dates without defining the dates.
For example:
Pulling the highest high from an hourly chart for a 7 day period. Something like, highest(t)-(t-7), to pull the highest high between 27th sept (t) and 20th sept (t-7).
The reason I am looking down this avenue is because I was using an hourly multiple to indicate daily levels, however this becomes a problem when the highest or lowest prices fall near the back end of the time frame, as the number of hours it would need to look at to capture “daily” levels would need to increase by 1 every hour. So if it used 115 hours of prices to capture 7 days of data, this would need to increase by 1 every hour in order to keep the full days pricing data.
Any advice or solution would be greatly received.
Many Thanks
Liam
09/27/2016 at 8:40 PM #1382509/28/2016 at 7:05 AM #13833Hi Nicolas,
To add levels derived from daily numbers to an hourly candle chart
Many Thanks
09/28/2016 at 7:09 AM #1383409/28/2016 at 7:42 AM #13835No prob at all!
looking more for the highest high & lowest low between 2 dates and show them on hourly timeframe
09/28/2016 at 1:12 PM #13853Ok! So you don’t need to spot them on an hourly chart specifically, you can use OHLC of daily timeframe for that!
Because the highest high of an hourly chart is exactly the same as the high of a day.
So, you can code it like this:
123456789101112131415//store the highest high and lowest low during 7 days and then resetif day<>day[1] thencount = count +1endifif count=8 thencount = 0hh = closell = closeendifhh= max(hh,high)ll= min(ll,low)RETURN hh,ll09/28/2016 at 1:30 PM #13856Thanks very much Nicolas, will try this out
-
AuthorPosts
Find exclusive trading pro-tools on 