I am working on a strategy that runs tick by tick and when backtesting I get sometimes 100+trades within a single 15second candle which I can't explain.
There are several steps I take to prevent something like this.
1. Every condition to enter a trade in my code includes "Position.MarketPosition == MarketPosition.Flat &&..."
2. The OnStateChange includes "EntriesPerDirection = 1;"
3. The order handling in the backtesting is also set to "EntriesPerDirection = 1"
...and yet this happens.
The range of this 15second candle is just big enough to account for the profit target and I doubt the price went from min to max back and forth 200 times in 15sec and even if so I dont want this in my back testing because realistically I would never get that oder fill speed running i the strategy
Does anybody know what causes this or more important how to prevent it?
Thank you in advance!
WELD
Comment