[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Any way to create hourly and daily bars from 5 minute data??



PureBytes Links

Trading Reference Links

Hello All,

I primarily scalp stocks intra day using the 5 minute chart but aware
of the trend and other support/resistance areas on longer term charts.
I'm attempting to setup the perfect 5 min chart that shows everything I
need.

I'd like to plot the hourly pivot points and R1, R2, S1, and S2. Keep
in mind that I have a ton of other data on my chart, weekly pivots,
daily pivots and the important moving averages that all pop up when
I get close enough to them, so as to NOT make my chart scale way out.
I like to have it zoomed in and have the numbers pop up when close.

Here's my question.  I have a pivot indicator I wrote that when used
on an hourly chart that is a hidden will plot the data I need.  Unfortunately
it also is clunky and I want to use trendlines to plot these hourly
midpoints.  TradeStation does NOT seem to want to allow me to
draw trendlines on my main 5 minute chart using data from the hidden
hourly data.

I would love to know the code to 'build' hourly bars using my 5 minute
data.  I'm assuming this can be done by using the for value1=1 to 12 begin
command and capture the lowest low and highest high and the close on the
last bar.  This should be identical to the hourly low, high, and close.

Would this work?  And since the stock market opens at 9:30, how can I get
around any wierd problems since there are only 6:30 hours in a trading day.

Does anybody have the code that creates hourly and even daily bars from
5 minute bars?

Thanks in advance.  Also, I was thinking that this code could also be used
to display accurate daily moving averages on the five minute chart, a very
valuable thing indeed and a tremendous saver of space!  Imagine having
1 chart that gives you important data from all major trading time frames!
I already have 6 monitors and feel I need about 12 more to show all the
data I need to make the best decisions. I've recently come to the conclusion
that there has to be a way to do this.  The software Fibonacci Trader is great
since it shows all the multiple time frames in just one chart, TradeStation
has to have a way to do this.

Thanks in advance

Chris Donnell