Hi Team. I have a code in which i am trying to entry at a limit price after a condition is met
todayO = TimeFrameGetPrice("O" , inDaily , 0) ;
buycondition = close>todayO*1.02 and Low<Min(Ref(close , -1) , Ref(high , -1)*0.995) and timenum>93000 ;
entryprice = Min(Ref(close , -1) , Ref(high , -1)*0.995)
Buy = buycondition ;
// Sell code is simple ( EOD exit)
// No other condition or indicator is used
// No trade delays used if low of the current bar is below my limit price. i enter at market( kinda a limit order)
This code is showing exceptional results in backtest over a bunch of equities...
My Only question is--- i am using close to check whether i am above 2% from today's open and using a limit order in the same bar to achieve a better entry..
Isn't there a look ahead(future looking ) bias in my code as the close of the bar is not known in advance and i am entering with a limit price in the same bar( no trade delays)
The code preview does not show any look-ahead bias. But i feel i am doing something wrong.
Please tell is this tradeable????