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

Re: [amibroker] Re: dayofweek


  • Date: Tue, 05 Jan 2010 09:00:04 +0100
  • From: Aron <aron.groups@xxxxxxxxx>
  • Subject: Re: [amibroker] Re: dayofweek

PureBytes Links

Trading Reference Links




monday = DayOfWeek()==1;
since =
DateNum() >= 091101; // November 1, 2009
absoluteChange =
abs( ROC( C, 1 ) );
Change =
0;
Count =
0;
for ( i = 0; i < BarCount; i++ )
{
    
if (since[i] && monday[i])
    {
            Change = Change + absoluteChange[i];
            Count ++ ;
      
    }
}

MondayAVChange = Change/Count;



On 1/5/2010 7:14 AM, peter wrote:
Can anyone help me?

thanks

On Mon, Jan 4, 2010 at 3:49 PM, peter <yansunopportunity@xxxxxxxxx> wrote:
Hi,

I want to get average of one day of week average return during past several months. For example, I want to know Monday price average since three months ago. Does anyone know how to calculate it using afl?

thank you!






__._,_.___


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

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

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

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





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

__,_._,___