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

Re: [amibroker] Metastock PREV



PureBytes Links

Trading Reference Links

Hello,

This one is an example how presence of PREV thingy makes people to write inefficient codes (PREV is extremely slow).

Statement like this even in Metastock could be written without PREV.

MS:
setup = if( condition, variable, PREV )

can be written even if Metastock as

setup = ValueWhen( 1, condition, variable );

which executes way faster.

AmiBroker's syntax for it is:

setup = ValueWhen( condition, variable );


Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message ----- 
From: "dpweir" <dpweir@xxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Monday, August 01, 2005 1:49 PM
Subject: [amibroker] Metastock PREV


> Hello
>
> I am sorry if this is often asked question, but I was wondering what was the
> Amibroker equivalent to the metastock PREV statement, as I would like to
> convert some basic metastock formulas, as an example
>
> setup:=If(C > PREV,C,PREV);
>
> or better yet descriptively, another example,
>
> setup:=if(condition,variable,PREV);
>
> Thanks in advance
>
> David Weir
>
>
>
>
>
>
>
> Please note that this group is for discussion between users only.
>
> To get support from AmiBroker please send an e-mail directly to
> SUPPORT {at} amibroker.com
>
> For other support material please check also:
> http://www.amibroker.com/support.html
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
> 



------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a href="http://us.ard.yahoo.com/SIG=12h87grq8/M=362131.6882500.7825259.1493532/D=groups/S=1705632198:TM/Y=YAHOO/EXP=1122993180/A=2889190/R=0/SIG=10r90krvo/*http://www.thebeehive.org
">Put more honey in your pocket. (money matters made easy) Welcome to the Sweet Life - brought to you by One Economy</a>.</font>
--------------------------------------------------------------------~-> 

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.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/