Higher timeframe volume

Hi, is there a way to plot higher timeframe volume using Timeframeset or some other?

I tried Timeframeset, but doesnt seem to work.

Thanks for your help.

@sroy Include your code so members can show you where your mistakes are.

Of course TimeFrameSet works. Read the tutorial carefully, code the examples, run the Explorations and chart the Plots. By then you will have found your mistakes

http://amibroker.com/guide/h_timeframe.html

Hi, thanks a lot. I have successfully used timeframeset for higher timeframe MA, but may be I am going about it the wrong way here, perhaps some gfx usage required for creating the volume histogram for higher tf.

@sroy Seriously dude. Read the helpful post. I asked you to post your mistaken code and you did not. I told you to read the tutorial carefully and obviously you did not as you think

Simple and straightforward Plot command will give different time frame histogram of volume. Here for example is a Weekly plotted underneath the Daily.
image

more to follow later.

2 Likes

@sroy Ok, the rest of the story. I don't use MTF in any of my systems so I am not an expert. But below are some examples of using different MTF functions and the outputs.

TimeFrameSet( inWeekly );
closeW = C;
volW = V;
TimeFrameRestore();

// lets create some variables that will enable the Weekly calculations to be
// available to the Daily charts and Explorations
// Note: expandLast - the compressed value is expanded starting from
// last bar within given period (so for example weekly close/high/low
// is available on Friday's bar)

// two different ways to Explore our calculations
VolumeW2D = TimeFrameExpand( volW, inWeekly, expandLast );
VolumeW2D_useExpandPoint = TimeFrameExpand( volW, inWeekly, expandPoint );

// the default is expandLast
closeW2D = TimeFrameExpand( closeW, inWeekly );
closeW2D_useExpandPoint = TimeFrameExpand( closeW, inWeekly, expandPoint );
// Note: expandPoint - the resulting array gets not empty values only for the last bar
// within given period (all remaining bars are Null (empty))

// to help illustrate in our Exploration
// let us identify the End-of-the-Week
eow = DayOfWeek() > Ref( DayOfWeek(), 1 );
dow = DayOfWeek(); 

//////////////
// Charting //
//////////////
Plot( VolumeW2D, "Weekly Volume", colorAqua, styleHistogram | styleThick);

/////////////////
// Exploration //
/////////////////
Filter = 1;
dynamic_fg_Color = IIf( eow, colorWhite, colorDefault );
dynamic_Bk_Color = IIf( eow, colorLightBlue, colorDefault );
AddColumn( IIf( dow == 1, 'M', IIf( dow == 2, 'T', iif( dow == 3, 'W', IIf( dow == 4, 'R', 'F' ) ) ) ), "Day", formatChar );
AddColumn( eow, "End Of Week", 1.0, dynamic_fg_Color, dynamic_Bk_Color );
AddColumn( C, "Daily Close" );
AddColumn( V, "Daily Volume", 1.0 );
AddColumn( closeW2D, "WeeklyClose expandLast" );
AddColumn( closeW2D_useExpandPoint, "WeeklyClose expandPoint" );
AddColumn( VolumeW2D, "VolumeW expandLast", 1.0 );
AddColumn( VolumeW2D_useExpandPoint, "VolumeW with expandPoint", 1.0 );

The exploration will look like this,
image

So you see the Plot is a simple histogram Plot using the appropriate MTF functions.

My personal fetish is for THICK histograms, so I like to change the final argument in the Plot function to something like this (and of course you can use any width or color you prefer)

Plot( VolumeW2D, "Weekly Volume", colorAqua, styleHistogram | styleThick, Null, Null, 0, 0, 5 ); // SuperThick

I hope some of that helps. Good luck and get back to us if you find something profitable with it.

4 Likes