Traders Laboratory - View Single Post - Tradestation Volume Avg
View Single Post
  #5 (permalink)  
Old 03-22-2007, 09:01 AM
vj2651 vj2651 is offline
vj2651 has no status.

 
Join Date: Jan 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Tradestation Volume Avg

Thanks for the response. One more question I really don't want to mess up the indicator. Where exactly do I add this line? Here is the indicator. After I add the lines do I just save it and readd the indicator in radar screen? thanks again for the help.

inputs:
AvgLength( 50 ),
AlertPct( 50 ),
UpColor( Cyan ),
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 C > C[1] then
SetPlotColor( 1, UpColor )
else if C < C[1] then
SetPlotColor( 1, DownColor ) ;


{ ** Copyright (c) 1991-2003 TradeStation Technologies, Inc. All rights reserved. **
** TradeStation reserves the right to modify or overwrite this analysis technique
with each release. ** }

Reply With Quote