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

[amibroker] Re: Winter project, Correlation Trading


  • Date: Wed, 23 Dec 2009 22:56:25 -0000
  • From: "Mike" <sfclimbers@xxxxxxxxx>
  • Subject: [amibroker] Re: Winter project, Correlation Trading

PureBytes Links

Trading Reference Links

Jerry,

Sorry, sent you the link to the poor formatted version. The better version is here: http://finance.groups.yahoo.com/group/amibroker/message/144970

And, yes, if you want every Tuesday to be your criteria for a new period, then what you have done should work. But, you must also change the constant used in the calculations. Instead of 252 (i.e. trading days in a year), you would need to use 5 (i.e. trading days in a week).

Note also that when dealing with a year, minor errors in the alignment don't make much difference. But, when using just a week, as you are doing, the alignment will likely be more important and you will probably have to work out some more precise code than simply using multiples of 5 bars/week. For example, when the markets were closed due to holidays, using a hard coded multiple of 5 days will misalign the data.

Mike

--- In amibroker@xxxxxxxxxxxxxxx, "Jerry Gress" <pleasenospamplease@xxx> wrote:
>
> Thanks Mike,
> 
> Will work on changing Year() to week???
> 
> 
> In fact when I change the one line as below I get something that may work!!
> 
> 
> newYear = DayOfWeek()==2;//Year() != Ref(Year(), -1);
> 
> JG
> 
> 
> -----Original Message-----
> From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf
> Of Mike
> Sent: Wednesday, December 23, 2009 11:10 AM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] Re: Winter project, Correlation Trading
> 
> Jerry,
> 
> I was involved in a similar thread recently, excecpt covering 1 year at a
> time. Perhaps you can alter the code for your needs.
> 
> http://finance.groups.yahoo.com/group/amibroker/message/144969
> 
> Mike
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "Jerry Gress" <pleasenospamplease@>
> wrote:
> >
> > Hello All,
> > 
> > Would like to take the 1 minute data from three weeks ago and two weeks
> ago
> > then super impose it on the following week. For example: Monday 7 Dec,
> > Monday 14 all on Monday Dec 21.
> > 
> > 
> > My feeble attempt that does not work for one week:
> > 
> > yut = DayOfWeek()==2;
> > ytr = Ref(yut,-1);
> > Plot(ytr,"",colorGreen,styleBar);
> > 
> > 
> > So do I have to do the timeframe stuff?
> > 
> > Any help will be appreciated.
> > 
> > JG
> >
> 
> 
> 
> 
> ------------------------------------
> 
> **** 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/
> 
> Yahoo! Groups Links
>




------------------------------------

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

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:
    amibroker-digest@xxxxxxxxxxxxxxx 
    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/