I was wondering if anyone had an idea on how I could fix a problem I have while trying to simulate real-time trading.
Basically my problem is that I get an entry signal for a long or short position, and it enters it like it's supposed to. However, the price is going back and forth a few ticks making it hit the entry signal several times, and fills up my "entries per direction" in a matter of minutes.
It works fine on back testing because it runs on daily bars and it always get it's signal at the close of each bar.
What I want it to do is:
Hit the entry signal and enter a position with my default quantity -> Hold for at least 1 or 2 days -> Then run the algo again and look for a new entry/exit signal.
I tried using BarsSinceEntry() > 0 (and 1), but I realized that it won't do anything with that because there is no entries yet.
I hope I managed to make my problem understandable.

Comment