|
Quote: |
|
 |
|
|
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