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

[amibroker] Re: Simple "Days Back" Question



PureBytes Links

Trading Reference Links

Two things... you haven't defined AdvDecEMA before you've referenced
it... i.e. you try & define it and reference it at the same time.
Can't be done... second, you have a bracket missing from the end of
the offending line...

try this,

AdvDecEMA = 0;
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);

However, you will need to investigate the results of this... since you
recursively reference an array. Which I'm not 100% sure about.
Double check results... you may get something weird.

--- In amibroker@xxxxxxxxxxxxxxx, Conrad Smith <conradfsmith3@xxx> wrote:
>
> 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

*********************************
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> 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/