Jump to content

Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.

  • Welcome Guests

    Welcome. You are currently viewing the forum as a guest which does not give you access to all the great features at Traders Laboratory such as interacting with members, access to all forums, downloading attachments, and eligibility to win free giveaways. Registration is fast, simple and absolutely free. Create a FREE Traders Laboratory account here.

thewoj

How to Access Higher Timeframe Data

Recommended Posts

I have a radarscreen with various symbols, all with a 5 minute interval.

i want to add an indicator to display the Average Daily Volume for the last 20 days.

how can i access historical daily volume in easylanguage?

Share this post


Link to post
Share on other sites

Try this Volume Avg indicator modified for RS. Adjust the input for AvgLength to longer periods e.g. 20 days x 390min /5 on 5 min charts; 390min is 6.5 hrs Reg Trade Hrs.

inputs:  
AvgLength( 30 ),  
AlertPct( 50 ),  
UpColor( Green ),  
DownColor( Red ) ; 

variables:  
VVol( 0 ), 
AvgVVol( 0 ), 
TVol( 0 ), 
AvgTVol( 0 ), 
AlertFactor( 1 + AlertPct * .01 ),  
AlertStr( NumToStr( AlertPct, 2 ) ) ; 

if BarType >= 2 then { ie, not tick/minute data } 
begin 
VVol = Volume ; 
AvgVVol = AverageFC( Volume, AvgLength ) ;  
Plot1( VVol, "Vol" ) ; 
Plot2( AvgVVol, "VolAvg" ) ; 
{ Alert criteria } 
if VVol crosses over AvgVVol * AlertFactor then 
	Alert( "Volume breaking through " + AlertStr + "% above its avg" ) ; 
end 
else { if tick/minute data; in the case of minute data, also set the "For volume,  
use:" field in the Format Symbol dialog to Trade Vol or Tick Count, as desired } 
begin 
TVol = Ticks ; 
AvgTVol = AverageFC( Ticks, AvgLength ) ; 
Plot1( TVol, "Vol" ) ; 
Plot2( AvgTVol, "VolAvg" ) ; 
{ Alert criteria } 
if TVol crosses over AvgTVol * AlertFactor then 
	Alert( "Volume breaking through " + AlertStr + "% above its avg" ) ; 
end ; 

{ Color criteria } 
if UpTicks > DownTicks then  
SetPlotColor( 1, UpColor )  
else if UpTicks < DownTicks then 
SetPlotColor( 1, DownColor ) ; 

Share this post


Link to post
Share on other sites

thanks for the response.

 

so on a minute chart i would use 7800 as the AvgLength to get the 20 day average daily volume. i would also need to set "bars back" to 7800.

will this effect performance significantly?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.