You can do this by expressing the specific date as a DateNum then
triggering a Buy/Sell/Short/Cover for a specific symbol Name when
DateNum() == your date. You can hard code the dates in your script, or
read them in from a file.

e.g.

// Convert specific dates (e.g. June 27, 2007 - July 16, 2007) to
DateNum

myAABuyDate = ((2007 - 1900) * 10000); // Year
myAABuyDate += (6 * 100);              // Month
myAABuyDate += 27;                     // Day

myAASellDate = ((2007 - 1900) * 10000); // Year
myAASellDate += (7 * 100);              // Month
myAASellDate += 16;                     // Day

// Trade specific symbol for specific dates

SetTradeDelays(0, 0, 0, 0);

dates = DateNum();

Buy = Name() == "AA" AND myAABuyDate == dates;
BuyPrice = Open;

Sell = Name() == "AA" AND myAASellDate == dates;
SellPrice = Open;

Plot(Close, "Price", colorDarkGrey, styleBar);
PlotShapes(shapeUpArrow * Buy, colorGreen);
PlotShapes(shapeDownArrow * Sell, colorRed);

Mike


--- In [email protected], "sicko_canadian" <manuj.aggar...@...>
wrote:
>
> A specific date. say I develop a system or purchase someone's system
which just gives me market timing signals - I want to be able to test
them using SPX or QQQQ or QLD/QID pairs.
>
> spider
>
> --- In [email protected], "droskill" droskill@ wrote:
> >
> > A specific date meaning a generalized date (aka first day of the
month, first day of the week) or a specific date (aka 7/23/08)?
> >
> > The former I know you can do - the latter someone else will have to
answer.
> >
> > --- In [email protected], "sicko_canadian" <manuj.aggarwal@>
wrote:
> > >
> > > I want to be able to backtest certain strategies against 4,5
specific symbols.
> > >
> > > Say I want to purchase SPY on certain date. On getting another
signal replace it with QID etc.
> > >
> > > Is that possible AmiBroker?
> > >
> > > Thanks
> > > Spider
> > >
> >
>


Reply via email to