I wanted BollingerBand(c,5,1) for daily value and thus I put i on a daily chart.
Now I am migrating to a 5minute chart. If I put BollingerBand(c,5,1) then it will refer to the 5 minutes bars.
How do you do BollingerBand for daily on a 5 minute chart? [SOLVED]
-
- Posts: 83
- Joined: 18 Mar 2013
- Has thanked: 11 times
Re: How do you do BollingerBand for daily on a 5 minute char
The first idea that comes to mind is create a data 2 (sub chart) that is a daily chart and your data 1 is the 5 min bar. Then when you declare your variables declare them such as var1( 0, data2 ); and then when you reference var1, reference it as var1 of data2. So for example if var1 is the upper BB on the daily, and you want to sell when close > var1, then write when close > var1 of data2
There may be a way to reconstruct 5 minute bars into daily bars but I'm not exactly sure if the values would be the same versus the way I mention above.
I should note though, backtesting will be a little "off." The reason being I believe is even with IOG on data2 is only calculated on OHLC, not intrabar.
There may be a way to reconstruct 5 minute bars into daily bars but I'm not exactly sure if the values would be the same versus the way I mention above.
I should note though, backtesting will be a little "off." The reason being I believe is even with IOG on data2 is only calculated on OHLC, not intrabar.
- TJ
- Posts: 7742
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
Re: How do you do BollingerBand for daily on a 5 minute char [SOLVED]
I wanted BollingerBand(c,5,1) for daily value and thus I put i on a daily chart.
Now I am migrating to a 5minute chart. If I put BollingerBand(c,5,1) then it will refer to the 5 minutes bars.
See post #4
(4) [FAQ] Multiple time frame, Multi-Data Analysis
viewtopic.php?f=16&t=6929