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

Re: [amibroker] Functions needed



PureBytes Links

Trading Reference Links

Hello,
Look at this in the afl-reference quide under the help.

Best regards
Thomas

AMA2 - adaptive moving average 2 (AFL 1.5) SYNTAX ama2( ARRAY,
SMOOTHINGFACTOR, FEEDBACKFACTOR )
RETURNS ARRAY
FUNCTION calculates adaptive moving average - simliar to EMA() but smoothing
factor could be time-variant (array).
AMA2 has a separate control of feedbackfactor which is normally
(1-SMOOTHINGGFACTOR).

Internally this function works like this:

today_ama = SMOOTHINGFACTOR * array + FEEDBACKFACTOR * yesterday_ama

EXAMPLE The example of volatility-weighted adaptive moving average formula:

graph0 = ema( close, 15 );
fast = 2/(2+1);
slow = 2/(30+1);
dir=abs(close-ref(close,-10));
vol=sum(abs(close-ref(close,-1)),10);
ER=dir/vol;
sc =( ER*(fast-slow)+slow)^2;





----- Original Message -----
From: "Owen Davies" <owen@xxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Monday, November 26, 2001 3:00 AM
Subject: [amibroker] Functions needed


> Newbie alert!
>
> I've just downloaded AmiBroker and generally like
> what I see--but there are two functions I need and
> can't find:
>
> Is there a weighted moving average in here somewhere?
> I can use a simple or exponential average, but in the
> technique I'm looking at now, the results don't come
> out as well.
>
> And what about a BarsSince()? An Omega-style
> BarsSince(Entry) would be perfect, but I'll settle for
> some way to count off a couple of bars since my entry
> conditions were true. Without wome way to handle it,
> I'm in trouble.
>
> Also, can I get away with setting two exit criteria,
> one of which would trigger on the open under
> specified conditions, the other bailing on the close
> under other conditions? (With still other conditions
> leaving the trade in effect, of course.) Actually, it was
> the desperate need for this option that got me looking
> or an alternative to Metastock.
>
> Many thanks.
>
> Owen Davies
>
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>