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

Re: [amibroker] Re: equivalent of PREV



PureBytes Links

Trading Reference Links

Hello,

As I wrote in the past MS PREV is the worst thing they came up with.
Among other things it is painfully slow (try formula with and without PREV
in MS and you will understand what I am talking about - it makes things
hunderds times slower). 
They invented PREV because MS is incapable of looping. 

AmiBroker does not need such pseudo-solutions because you can
write loops in AFL and easily reference previous values:

HaOpen = HaClose = (O+H+L+C)/4; 

for( i = 1; i< BarCount; i++ ) 
{ 
  HaOpen[ i ] = (HaOpen[ i - 1 ] + HaClose[ i - 1 ]) /2; 
} 

Looping has no speed penalty of PREV and it is much more powerful and
syntactically clearer.

As for AMA it is actually very easy and powerful way to implement
any kind of dynamic recursive 1-st order smoothing and there is nothing odd about it.
(ask any engineer about 1-st order infinite impulse response filters)

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message ----- 
From: "Zeno" <lars.oppermann@xxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Monday, January 10, 2005 11:39 PM
Subject: [amibroker] Re: equivalent of PREV


> 
> 
> Hermann, Steve,
> 
> Thanks so much for your fast reply. My understanding is, that this is
> 'exploiting' the fact, that AMA is also dependant on a feedback of
> it's own result. 
> This is a nice trick, but it strikes my as being somewhat odd :)
> Shouldn't there be a more elegant way of doing those things in AFL
> (feature request?)
> 
> Thanks again
> ~Lars
> 
> 
> 
> 
> 
> 
> Check AmiBroker web page at:
> http://www.amibroker.com/
> 
> Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
> Yahoo! Groups Links
> 
> 
> 
> 
> 
> 
> 
>


------------------------ Yahoo! Groups Sponsor --------------------~--> 
In low income neighborhoods, 84% do not own computers.
At Network for Good, help bridge the Digital Divide!
http://us.click.yahoo.com/EpW3eD/3MnJAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

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/