PureBytes Links
Trading Reference Links
|
Bob Fulks and Bill W. offered good comments here. You might also
refer to my recent post at
http://www.purebytes.com/archives/omega/2001/msg08529.html
> If you are using 30 minute bars to calculate your strategy, and your
> strategy for the 30 minute bars was as follows:
> If Average(H, 5) > Average(H,10) then begin
> Buy 1 contract at Market;
> end;
>
> You can substitute the previous code for 1 minute bars by
> multiplying the parameter values by 30 as follows:
>
> If Average(H, 150) > Average(H, 300) then begin
> Buy 1 contract at Market;
> end;
This will **NOT** produce the same results, unless the high of each
1min bar is the same as all other 1min bars within a 30min bar.
Let's say the high of a 30min bar is 1000. Then no matter what else
happens in the bar, that 30min bar uses 1000 as its high when you
calculate an average. To simplify the example, let's say you use a 1-
bar "average" -- only looking at the average of 1 bar, i.e. just
looking at the high of that bar. The 1-bar "average" for this bar is
1000.
Now let's look at the 30 1min bars inside it. Average(H, 30) on
those 1min bars will only return 1000 if ALL THIRTY 1min bars have a
high of 1000. More likely they will all have lower highs, which
means the average of those 30 1min bars is NOT the same as the
"average" of the 1 30min bar.
Also, realize that a 1min chart calculates its N*30-bar average every
1 minute. A 30min chart calculates only every 30 minutes. So your
1min bar would produce a smooth average, while the average on the
30min chart would jump every 30 minutes. You may prefer this, but
it's definitely not the same as the 30min average.
You can see this difference very clearly if you chart 1min data in
Data1 and 30min data in Data2. Chart a LOT of bars, say 20 days or
so, so you don't run into MaxBarsBack problems with your indicators.
Now display Average(High Data1, 5*30) and Average(High Data2, 5).
Not only is the 30min average less smooth, it is also HIGHER than the
1min average, because the 1min average includes a lot of lower Highs
than the 30min average.
Gary
|