Thanks mate. I added the buy and sell signals and only one date range to begin, 
with the backtester range setting on "all quotations" (only setting that 
produced a trade). There was one trade opened on the beginning 07/04/03 and 
closed at the end 08/11/04. No other buy/sell signals triggered during that 
date range. This is the arrangement example. Thanks so much anyway. :)

Dates = DateNum();
MyBuySignal = Cross( MACD(), O );
ValidBuyDates = Dates == 1030404;

Buy = MyBuySignal AND ValidBuyDates; 

Dates = DateNum();
MySellSignal = Cross( 0, MACD());
ValidSellDates = Dates == 1041105;

Sell = MySellSignal AND ValidSellDates;   

   

  

--- In [email protected], "Mike" <sfclimb...@...> wrote:
>
> Try something like the following:
> 
> Dates = DateNum();
> MyBuySignal = ...;
> ValidBuyDates = Dates == 1041105 OR Dates == ... OR Dates == ...;
> 
> Buy = MyBuySignal AND ValidBuyDates;
> ...
> 
> Repeat the same for Sell.
> 
> Mike
> 
> --- In [email protected], "jollypolly999" <jollypolly999@> wrote:
> >
> > Greetings. I have spent several hours doing individual backtests within 
> > certain historical dates. For example my system will only enter the stock 
> > exchange if certain criteria are met. There are 10 seperate dates in which 
> > I switch the system on and off.
> > 
> > So the question remains. Please, is it possible to add code to my formula 
> > so that the backtester only tests within the 10 seperate defined dates?
> > 
> > I have tried adding the following code (an example) but the backtester 
> > over-rides it. Unless I need to tick something in the backtester. 
> > 
> > Buy = Buy OR (DateNum() == 1030404); which is 04/04/03
> > Sell = Sell OR (DateNum() == 1041105); which is 05/11/04
> >
>


Reply via email to