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

Re: [amibroker] ValueWhen() function



PureBytes Links

Trading Reference Links

Have a generic answer for you:

1. Use weekly data. This automatically includes data Monday thru Friday.
2. Make sure you limit data to complete years. So put a date limitation on
data
3. Use loops and ATC tp accumulate data for similar weeks
4. Devide results by number of years you used.


----- Original Message ----- 
From: "yps_trader" <yps_trader@xxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Monday, October 04, 2004 10:13 AM
Subject: [amibroker] ValueWhen() function


>
>
> Hello,
>
> my aim is to create an array with the closing price on the same day
> of the year but one year ago.
> I figured I could use the ValueWhen function for this:
>
> x=valuewhen(Dayofyear()==???,C,1);
>
> However I am having problems with the expression. The expression
> should be true on every dayofyear() in the past with the same value
> as the actual dayofyear().
> The larger background is that I would like to create Seasonal Charts
> with Amibroker.
> I wanted to do this, by averaging the Closing price of each specific
> dayofyear() of e.g. the last 10 years and then chart this array.
>
> I hope someone can help me.
>
> Regards
>
> dj
>
>
>
>
>
>
> 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 --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/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/