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

Re: [amibroker] Simple "Days Back" Question



PureBytes Links

Trading Reference Links

Hi - You need to define an array before you can reference it, you are trying to reference it at the same time you are creating it. Since the value of each element in your array depends on yesterday's value, probably easiest to loop through each element one at a time ( using subscripts ), or you might check AMA2 functions to see if that would work for you.
 
Steve
----- Original Message -----
Sent: Saturday, January 10, 2009 10:26 PM
Subject: [amibroker] Simple "Days Back" Question

Hi guys,

In the following custom indicator, I reference a day back but, for reasons that I hope are obvious to you, it throws an error.

The indicator:

PastWeight = Param("Past Data Weight", 0.1, 0.1, 2, 0.1);
NewWeight = Param("New Data Weight", 0.9, 0.1, 2, 0.1);
AdvDecEMA = (NewWeight * Ref(AdvDecEMA, -1) + PastWeight * (AdvIssues() - DecIssues());

Plot(AdvDecEMA, "McMillian Adv/Dec", colorBlue, style = styleLine, Null, Null, Null);

I've colored the problem bit in red.

Any help would be most appreciated!

Thanks,
Conrad
__._,_.___

**** IMPORTANT ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

*********************
TO GET TECHNICAL SUPPORT from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
*********************

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html

*********************************




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___