PureBytes Links
Trading Reference Links
|
Hello,
Arguments for built-in oscv() can not be time-variable.
The only way to implement adaptive moving averages
and oscillators is to use AMA function (not AMA is available in 3.52 and above):
Variable (adaptive) volume oscillator should
be coded as follows:
/*
var1=(peakbars(H,18,1) );
var2=(Peakbars(H,18,2) );
var3=var2-var1;
fastperiods = var3;
slowperidds = var2;
*/
/* Calculate fastperiods and slowperiods somehow */
/* it may be the formula commented above */
/* Then calculate adaptive oscillator using formula below */
fastsc = 2 / ( fastperiods + 1 ); // calculate smoothing factor from periods
slowsc = 2 / ( slowperiods + 1 );
adaptiveoscv = ama( volume, fastsc ) - ama( volume, slowsc );
Best regards,
Tomasz Janeczko
===============
AmiBroker - the comprehensive share manager.
http://www.amibroker.com
----- Original Message -----
From: "Steve Wiser" <slwiserr@xxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Sunday, April 08, 2001 1:40 AM
Subject: [amibroker] What is wrong with this?
> Hello:
>
> var1=(peakbars(H,18,1) );
> var2=(Peakbars(H,18,2) );
> var3=var2-var1;
> graph0=oscv(var3,var2);
>
>
> This gives me a bad argument error.
>
> Steve
>
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
|