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

Re: [amibroker] Custom Rollover Dates & Testing



PureBytes Links

Trading Reference Links

Thnaks Terry for your answer..
I would prefer to do it hard way ( second approach) but what I am not
able to understand  is this: since I roll/change contracts every month
I use less than 30 day data windows for any given contract and I am
going to have 120 contracts for a ten year window and my indicators
that generate signals require 100 bars of data - how is the built in
array of High/Close/etc being built then? I guess what I am missing is
what data is being used to generate BUY in the second case scenario..

Tks

Paul


PS I am not sure if I am expressing myself correctly here..

- Show quoted text -

>
> On 6/9/06, Terry <MagicTH@xxxxxxxxxxx> wrote:
> > Ideas:
> >
> > 1. Easy way: Get properly back-adjusted data from a good source.
> >
> > 2. Hard way: I could envision, with some work and appropriate symbol
> > names, that you could write code that would change the symbol name based
> > on the date and thus either change foreign()/SetForeign() data OR
> > require the correct symbol name in the buy statement based on the date.
> > The concept would look "something" like this:
> >
> > function currentSym(currentDate)
> > {
> >    todaysTicker = "NQ "
> >           + "appropriate string is computed and placed here";
> >    return todaysTicker;
> > }
> >
> > Buy = yourCondition AND Name() == currentSym(DateNum(BarIndex()));
> >
> > Your user-defined function could either figure out the right symbol
> > number or just read from a list.
> >
> > Also since there are no "arrays of strings" you will have to get
> > creative on picking out today's date as my code above does not actually
> > work.
> > --
> > Terry