Overcoming A Stuck Trade When The Market Moves In or Out

Advanced automation available in Guardian - Chat with others and share files here.
Post Reply
diablodavo
Posts: 35
Joined: Thu Feb 04, 2021 1:08 pm

Hoping someone can help here.

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. :)
User avatar
ODPaul82
Posts: 825
Joined: Sun May 08, 2011 6:32 am

Try the "Fill or Kill" option
diablodavo
Posts: 35
Joined: Thu Feb 04, 2021 1:08 pm

Thanks, I just checked the bot and stupidly I had entered the values for 'Fill or Kill' then forgot to check the box for it to arm.

However, if the bot just killed the bet after 15 seconds which it is set to do, then won't that create an imbalance between the back and lay?

Meaning, when a trade is placed it backs and lays offset 1 tick. which means when one is matched and the other isn't then one side of the trade is sat in the market with no cover... My understanding is that the idea is to cover each side of the trade. That is why I would have thought it could instead of killing the bet, actually place another more inside the current trading range which has much more chance of being matched, and once matched then it can go ahead and kill the original bet, thus making sure the trades are balanced and in such a way is covered.

Then it can continue.

Am I reading this right?... I am totally learning this stuff so am still 90% clueless.

Thank you for your patience.
User avatar
firlandsfarm
Posts: 3384
Joined: Sat May 03, 2014 8:20 am

The problem with automated scalping is you can always be left with an unmatched bet regardless of using the Fill or Kill option. If you don't use that option then both bets are placed straight away and if you do use the option then the Offset bet is not placed until the initial bet is matched but that in no way guarantees that the Offset bet will be taken. You have five choices if you are left high and dry ...

1. let the unmatched bet cancel and the matched bet ride and keep your fingers crossed
2. 'Keep' the unmatched bet into in-running and keep those finders crossed. If the bet is matched in running then your scalp will have been successful but if not then the outcome will be the same as in "1"
3. Take the loss on that selection by taking SP at the off
4. Green(red)-up just before the off to spread the loss.
5. Green(red)-up in-running for a predetermined profit or loss depending on how the odds move.

If I think you want to "place the Offset within the current trading range when it's placed" I would have thought that's what is will always do within the number of offset ticks if the Fill or Kill option is used. For the initial bet to be matched it must by definition be inside the current trading range even if you place the initial bet outside of the current range. So subject to your tick offset being reasonable the Offset bet must be within the current range or am I misunderstanding you?
Post Reply

Return to “Bet Angel - Automation”