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

Re: [amibroker] Yet another question about the equivalent of PREV



PureBytes Links

Trading Reference Links

Hello,

That's simple. Use looping.

K = 0;

for( i = 6; i < BarCount; i++ )
{
   K[ i ] = C[ i ] + 0.98 * K[ i - 6 ];
}

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message ----- 
From: "Owen Davies" <owen5819@xxxxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Wednesday, February 09, 2005 5:24 AM
Subject: [amibroker] Yet another question about the equivalent of PREV


> 
> Oddly enough, I actually understand how to use AMA2 as an equivalent of 
> that other product's PREV function.  However, what happens if you need 
> some earlier value of the variable? For example:  K = C + (0.98 * 
> Ref(K,-6)).  Ref(K,-1) == PREV; what does Ref(K,-6) equal?  I'm tempted 
> to try Ref(PREV,-5), or rather the AMA2() equivalent, but it can't be 
> that easy.
> 
> Many thanks.
> 
> Owen Davies
> 
> 
> 
> 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 --------------------~--> 
What would our lives be like without music, dance, and theater?
Donate or volunteer in the arts today at Network for Good!
http://us.click.yahoo.com/Tcy2bD/SOnJAA/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/