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

Re: why the backtest did not work?



PureBytes Links

Trading Reference Links

Hi,

perhaps in the last line you must have
Sell = Cross( sellstop,SellPrice );

stephane
> I am not sure I understand this. The following system has only one 
> trade on 4 years of data and with every stock I tried. Something is 
> wrong and I can not figure out why. Any idea?
> 
> =========
> BuyStop= ref(HHV(C, 20), -1);
> SellStop= ref(LLV(C, 20), -1);
> BuyPrice = max( BuyStop, Low ); 
> SellPrice = min( SellStop, High );
> Buy = Cross( High, BuyStop ); 
> Sell = Cross( SellPrice, sellstop);