I am testing a simple scalping bot on the horse racing markets. I basically just copied this from Peter's YT video
https://www.youtube.com/watch?v=D_JhGo-nU3M
I have been tracking the profit and losses and I have identified a major reason I am getting quite a few losses and what leads to it.
I have noticed that when a 5 minute trading session has plenty of trades, I am almost always in profit, yet if there are only a few trades in a session I am usually in loss.
The loss trades seem to occur when a back/lay with offset 1 is placed and the (for example) the back bet is matched, then the market moves and the lay bet just sits there creating a choke point for the bot where it can no longer continue trading while waiting for that lay bet to get matched if it ever does. The same if the lay is matched and the back is stuck... That is where i think the problem lies.
So I am wondering how I can add rules or conditions so that say for example a trade gets stuck for a predetermined amount of time, then the bot (if lay bet) puts in another lay bet at a price more within current range and once matched it then cancels the stuck bet, and vice versa if back bet stuck then place another back bet closer to the trading price and once matched cancels the stuck back bet.
What this would do is then allow the bot to continue on its way and hopefully into profit.
Now I know this would interfere with the offset rule, and could lead to a small bump down in the trading, but my thinking is that it at least would get the bot back up and running.
So I guess what i am asking for is can someone tell me how I can set up this extra element within the bot?
thank you very kindly for any help.
