Hello all. I was hoping that I could get some opinions on an AFL that I tweaked from one I found on the forums. Is this a data snooping bias? In other words, is it triggering trades on information in the future that it should not yet know? I'm backtesting it and getting so-so results, but before I build on it, I just wanted to make sure. "a" and "b" are just simple crossover criteria not shown here.
---
Buy = a AND (H!=O) AND TimeNum() > 093000 AND TimeNum() < 150000;
Sell = b AND (L!=O) OR TimeNum() >= 155000 AND TimeNum() <= 160000;
BuyPrice = ValueWhen(Buy,O,1);
SellPrice = ValueWhen(Sell,O,1);
Buy = Ref(Buy,-1);
Sell = Ref(Sell,-1);
---
Thank you so much.
---
Buy = a AND (H!=O) AND TimeNum() > 093000 AND TimeNum() < 150000;
Sell = b AND (L!=O) OR TimeNum() >= 155000 AND TimeNum() <= 160000;
BuyPrice = ValueWhen(Buy,O,1);
SellPrice = ValueWhen(Sell,O,1);
Buy = Ref(Buy,-1);
Sell = Ref(Sell,-1);
---
Thank you so much.