Traders Laboratory - View Single Post - Bid-Ask Pressure Indicator for Tradestation
View Single Post
  #5 (permalink)  
Old 11-01-2007, 05:45 AM
Blu-Ray's Avatar
Blu-Ray Blu-Ray is offline
Blu-Ray has no status.

Trader Specs
 
Join Date: Nov 2006
Location: England
Posts: 418
Thanks: 105
Thanked 49 Times in 32 Posts
Re: Bid-Ask Pressure Indicator for Tradestation

Quote:
View Post
Is there anyway that this can be converted to ELS (2000i) version? Or I can get the code so that I can do it myself?

Thanks
Here you go ...........



inputs:
Period(20),
UpColor(green),
DownColor(red);

variables:
MyVol(0),
Color(yellow),
SmoothedBA(0),
Length(squareroot(Period) ),
intrabarpersist MyCurrentBar(0),
intrabarpersist VolumeAtBid(0),
intrabarpersist VolumeAtAsk(0),
intrabarpersist BAVolRatio(0),
intrabarpersist VolTmp(0);

if LastBarOnChart and BarStatus(1) <> 2 then begin
MyVol = Iff(BarType < 2, Ticks, Volume);
if CurrentBar > MyCurrentBar then begin
VolumeAtBid = 0;
VolumeAtAsk = 0;
BAVolRatio = 0;
VolTmp = 0;
MyCurrentBar = CurrentBar;
end;
if InsideBid < InsideAsk then begin
if Close <= InsideBid then
VolumeAtBid = VolumeAtBid + MyVol - VolTmp
else if Close >= InsideAsk then
VolumeAtAsk = VolumeAtAsk + MyVol - VolTmp ;
end;
if VolumeAtBid > 0 and VolumeAtAsk > 0 then BAVolRatio = Log( VolumeAtAsk / VolumeAtBid );
VolTmp = MyVol ;
end ;
SmoothedBA = xaverage(xaverage(BAvolra tio, Length), Length);
if SmoothedBA <= 0 then color = DownColor else color = UpColor;

plot1(SmoothedBA, "Pressure", color);
Plot2( 0, "ZeroLine" ) ;


Cheers

Blu-Ray

__________________
Remember - Take the path of least resistance.
Reply With Quote