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

[amibroker] Need coding help with volume indicator



PureBytes Links

Trading Reference Links

I'm new at this. I'm getting an error in the first line because the
variable 'upvol' hasn't been initialized. I want UpVol to remain the
same as yesterday if C < O.  Thanks for any help!

UpVol =IIf(C > O, V, Ref(UpVol,-1));
DownVol =IIf(C < O, V, Ref(DownVol,-1));
Period = Param("Period",3,2,10,1);
UpVolAvg = EMA( UpVol, Period ) ;
DownVolAvg = EMA( DownVol, Period ) ;
Plot(UpVolAvg,"UpVolume", colorGreen);
Plot(DownVolAvg, "DownVolume", colorRed);


Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.430 / Virus Database: 268.15.4/563 - Release Date: 12/2/2006 9:59 AM