I couldn't find where it was but am sure this was already addressed:
how to code/backtest an entry signal in such a way that the entry is done on 
the current bar, and NOT the next bar?
Also, how to code an exit at close on this same "current" bar??

Actually, I want to test an idea developed in S&C last month which is to enter 
atopen if this open is below the close the day (bar) before. Something like 
PlotShapes( IIf (O < Ref(C,-1) , shapeuparrow , shapeNone ),colorGreen ); 
Buy=  O < Ref(C,-1);
Sell=Buy;//here I would like to exit this same bar but at close... 

When I code it this way it works (the up arrow shows well on the right bar) but 
in the backtest the entry is made on the next bar.

Thank you for any help!

Carl

Reply via email to