PureBytes Links
Trading Reference Links
|
Hi Steve,
I have gone through the help and the archives and I have tried the
solutions of TJ.
Each Bar I calculate a variable VarX by multiplying the VarX of the
previous Bar by another variable B. Variable B is recalculated each
Bar.
VarX[t]=b*varX[t-1];
It looked like I could solve my problem using the AMA2 function.
In the manual is stated (page 258)
Quote
Internally this function works like this:
today_ama=SMOOTHINGFACTOR*array+FEEDBACKFACTOR*yesterday_ama
Unquote
As I do not need the array I thought the value of the moothingfactor
should be zero
Varx=AMA2(Close,0,B);
I alo tried
Varx=AMA2(Close,1,B);
But it did not give the required results.
I hope that you or anybody else can help me out.
PS
I am translating the Dynamic Breakout Indicator from EL to Afl.
It works moothly in EL and the results are encouraging but I prefer
to use AB
cees
--- In amibroker@xxxxxxxxxxxxxxx, "Steve Dugas" <sjdugas@xxxx> wrote:
> Hi,
>
> TJ has shown several times how to use AMA and AMA2 functions for
this type
> of thing. You can find more info by using the search tab in the
help. I dont
> know how AB determines the initial value for these functions, but
to
> initialize it yourself I think you would have to do it the long
way, for
> example:
>
> vara[0] = 20;
> for( i = 1; i < barcount; i++ )
> vara[i] = your formula including "vara[ i-1]" for yesterday's
value;
>
> Steve
>
> ----- Original Message -----
> From: "ceesvh" <cees-vanhall@xxxx>
> To: <amibroker@xxxxxxxxxxxxxxx>
> Sent: Wednesday, April 07, 2004 4:02 PM
> Subject: [amibroker] initializing an array
>
>
> >
> > hello,
> >
> > I have seen in the archives that this topic has been dicussed in
> > november 2002 resulting in 2 emails of Tomasz. However I believe
> > that my problem is different.
> >
> > For ech bar I calculate the value of the variable vara using the
> > value of vara of the previous bar except for the first bar when
the
> > value of vara is 20.
> >
> > first bar vara=20
> > all other bars vara=function of vara previous bar.
> >
> > I am familiar with other languages where I should use the
following
> > syntax
> > eg. if currentbar=1 then vara=20;
> >
> > However that is not the way Afl works.
> >
> > all help is appreciated
> >
> > cees
> >
> >
> >
> >
> >
> > Send BUG REPORTS to bugs@xxxx
> > Send SUGGESTIONS to suggest@xxxx
> > -----------------------------------------
> > Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
> > (Web page: http://groups.yahoo.com/group/amiquote/messages/)
> > --------------------------------------------
> > Check group FAQ at:
> http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|