So, I've had success using the ADE.DeriveBigBar function when using intervals of a day or less.
However, when I run a chart resolution of 1 day or 1 week and try to derive a monthly chart I keep getting a false value, and thus no data for the weekly or monthly bar. Has anyone else encountered this issue?
Issue with the ADE.DeriveBigBar(Interval) function
-
- Posts: 36
- Joined: 24 Apr 2012
- Has thanked: 6 times
- Been thanked: 2 times
- Dave Masalov
- Posts: 1712
- Joined: 16 Apr 2010
- Has thanked: 51 times
- Been thanked: 489 times
Re: Issue with the ADE.DeriveBigBar(Interval) function
Hello pschriber2,
ADE can be used only on intraday resolutions:
Therefore, tick or contract resolutions as well as intervals higher than 1440, daily and day-based bars cannot be used.
Moreover, the configured interval should be a direct multiple of the current interval.
ADE can be used only on intraday resolutions:
Code: Select all
if BarType = 0 then
Value1 = ADE.RaiseError("ADE.DeriveOHLCV can't be used on tick/volume charts.");
if Interval > 1440 then
Value1 = ADE.RaiseError("Interval too large for ADE.DeriveOHLCV.");
if Interval <> ADE.BarInterval and ADE.IsHigherTF(Interval) = false then
Value1 = ADE.RaiseError("ADE can only derive OHLCV data for the same or higher timeframes.");
if Interval > 0 and Mod(Interval, BarInterval) <> 0 then
Value1 = ADE.RaiseError("ADE can only derive OHLCV data for intervals which are"
+ " direct multiples of the current interval.");
Moreover, the configured interval should be a direct multiple of the current interval.
-
- Posts: 36
- Joined: 24 Apr 2012
- Has thanked: 6 times
- Been thanked: 2 times
Re: Issue with the ADE.DeriveBigBar(Interval) function
Hey Dave,
Here's what the ADE documentation says for ADE.DeriveBigBar()
You can use this function to derive higher timeframe bars all the way up to monthly bars. However, if you derive daily, weekly, or monthly bars from intraday bars, you should be aware that the bars will probably not exactly match the bars on a daily, weekly, or monthly chart. This happens because the closes on these charts reflect the official settlement prices for each day. In addition, there are factors that may cause the daily open to be different, and these differences may result in differing highs and lows as well. Thus, the synthetic bars created by ADE.DeriveOHLCV will be an accurate summary of intraday activity, but there will often be small differences from the bars on daily or higher charts.
If you derive weekly or monthly bars from daily bars, the derived bars should match those on weekly or monthly charts, since they start with daily data.
So I'm using -1 for weekly and -2 for Monthly, which aren't greater than 1440.
Here's what the ADE documentation says for ADE.DeriveBigBar()
You can use this function to derive higher timeframe bars all the way up to monthly bars. However, if you derive daily, weekly, or monthly bars from intraday bars, you should be aware that the bars will probably not exactly match the bars on a daily, weekly, or monthly chart. This happens because the closes on these charts reflect the official settlement prices for each day. In addition, there are factors that may cause the daily open to be different, and these differences may result in differing highs and lows as well. Thus, the synthetic bars created by ADE.DeriveOHLCV will be an accurate summary of intraday activity, but there will often be small differences from the bars on daily or higher charts.
If you derive weekly or monthly bars from daily bars, the derived bars should match those on weekly or monthly charts, since they start with daily data.
So I'm using -1 for weekly and -2 for Monthly, which aren't greater than 1440.
- Dave Masalov
- Posts: 1712
- Joined: 16 Apr 2010
- Has thanked: 51 times
- Been thanked: 489 times
Re: Issue with the ADE.DeriveBigBar(Interval) function
Hello pschriber2,
Weekly and monthly resolutions are day-based in MultiCharts. You can try to modify the script of the function to make it work with weekly and monthly bars.
Weekly and monthly resolutions are day-based in MultiCharts. You can try to modify the script of the function to make it work with weekly and monthly bars.