[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

VolumeRatio



PureBytes Links

Trading Reference Links

This is a very useful indicator in TS6.  I am having difficulty making it
verify in ts4.  It first wants to have names shortened, but then does not
recognize "BarType".  However, I find no such function in TS6.  Any help is
appreciated.

dr
============================================================================
======

inputs:

AvgLength( 55),

UpVolAlertPct( 5), { UpVol alert if Avg( UpVolPct - DnVolPct ) >
UpVolAlertPct }

DnVolAlertPct( -5) ; { DnVol alert if Avg( UpVolPct - DnVolPct ) <
DnVolAlertPct }

variables:

TotalTicks( 0 ),

VolRatio( 0 ) ;

if BarType <= 1 then { ie, if tick or minute bars }

begin

TotalTicks = UpTicks + DownTicks ;

if TotalTicks > 0 then

VolRatio = 100 * ( UpTicks - DownTicks ) / TotalTicks

else

VolRatio = 0 ;

Plot1( XAverage( VolRatio, AvgLength ), "VolRatioAvg" ) ;

Plot2( 0, "ZeroLine" ) ;

{ Alert criteria }

if Plot1 crosses over UpVolAlertPct then

Alert( "UpVol alert" )

else if Plot1 crosses under DnVolAlertPct then

Alert( "DnVol alert" ) ;

end ;