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

what a strange results in backtest



PureBytes Links

Trading Reference Links

Hi, Tz,

I have got a strange results when testing with N last quotations and 
I have had a negative profit neg by billions...
It occurs when I have tested with a number of bars > numbers of bars 
in the stock( for example test on 500 bars and some stocks have only 
200 or 300 bars.

I have used 
a basic system with sellprice on stoploss
****************************

N=Cross(C,MA(C,20));
Np=ValueWhen(N,Close,1);

/****************Loss Stop********************/

Slp= Ref(L,-1)-MA(ATR(1),10);
Slp= HighestSince(N,Slp,1);
Sl= L<Slp AND BarsSince(N)!=0 ;
Stop= Sl and Ref(Sl,-1)==0;
/***********Graph***************/

Xb= ExRem(Stop,N);

/**************Define Stops Price*********/

Slp=IIf(Xb,IIf(O<= Slp ,O,
IIf(L< Slp, Slp ,0)),0); 
Xp=ValueWhen(Xb,Slp);


/*************Buy& Sell Signals*****************/
Buy=N;
Sell= Xb ; 
BuyPrice= Np; 
SellPrice= Xp; 

*******************************



12074	Out	11/11/99	10/01/00	0.00	0.0%	
12074	Long (stop)	10/01/00	11/01/00	-
1516300307610.03	-15163003076.1%	
12074	Out	11/01/00	17/01/00	0.00	0.0%	
12074	Long (stop)	17/01/00	18/01/00
221843502827296460000.00	-14630578334.4%	
12074	Out	18/01/00	25/04/00	0.00	0.0%