duplicate bet - how to do the timing with fill or kill and rearming delay?

Advanced automation available in Guardian - Chat with others and share files here.
Post Reply
pj007
Posts: 3
Joined: Sun Sep 08, 2024 7:20 am

Hi

I'm using simulation mode to test a strategy and I've had an order fire before the 'fully matched' order information comes through, generating a duplicate bet. Any words of wisdom would be welcome.
duplicate.jpg
Log:
8/03/2025 09:46:03: [G_Auto 1] : $ 2.22 Lay bet placed on Nicolai Von Dellingshausen at 46. Entirely unmatched when it initially reached the market. Ref: 10012 ( Fill or kill bet with 360 seconds delay. )
8/03/2025 09:52:03: [G_Auto 1] : $ 2.22 unmatched bet (Ref:10012) was killed.
8/03/2025 09:52:03: [G_Auto 1] : $ 2.22 Lay bet placed on Nicolai Von Dellingshausen at 46. Entirely unmatched when it initially reached the market. Ref: 10022 ( Fill or kill bet with 360 seconds delay. )
8/03/2025 09:58:03: [G_Auto 1] : $ 2.22 unmatched bet (Ref:10022) was killed.
8/03/2025 09:58:03: [G_Auto 1] : $ 2.22 Lay bet placed on Nicolai Von Dellingshausen at 46. Entirely unmatched when it initially reached the market. Ref: 10027 ( Fill or kill bet with 360 seconds delay. )
8/03/2025 10:04:03: [G_Auto 1] : $ 2.22 unmatched bet (Ref:10027) was killed.
8/03/2025 10:04:03: [G_Auto 1] : $ 2.22 Lay bet placed on Nicolai Von Dellingshausen at 46. Entirely unmatched when it initially reached the market. Ref: 10030 ( Fill or kill bet with 360 seconds delay. )
8/03/2025 10:10:03: [G_Auto 1] : $ 2.22 unmatched bet (Ref:10030) was killed.
8/03/2025 10:10:04: [G_Auto 1] : $ 2.22 Lay bet placed on Nicolai Von Dellingshausen at 46. Entirely unmatched when it initially reached the market. Ref: 10033 ( Fill or kill bet with 360 seconds delay. )
...
...
8/03/2025 11:28:09: [G_Auto 1] : $ 2.22 unmatched bet (Ref:10060) was killed.
8/03/2025 11:28:09: [G_Auto 1] : $ 2.22 Lay bet placed on Nicolai Von Dellingshausen at 46. Entirely unmatched when it initially reached the market. Ref: 10061 ( Fill or kill bet with 360 seconds delay. )
8/03/2025 11:34:09: [G_Auto 1] : $ 2.22 unmatched bet (Ref:10061) was killed.
8/03/2025 11:34:09: [G_Auto 1] : $ 2.22 Lay bet placed on Nicolai Von Dellingshausen at 46. Entirely unmatched when it initially reached the market. Ref: 10062 ( Fill or kill bet with 360 seconds delay. )
8/03/2025 11:40:05: [G_Auto 1] : $ 2.22 Lay bet placed on Nicolai Von Dellingshausen at 46. Fully matched at 46. Ref: 10063 ( Fill or kill bet with 360 seconds delay. )
8/03/2025 11:40:05: [G_Auto 1] : $ 2.22 of unmatched bet (Ref:10062) was filled before remainder was killed.


Trigger:
- unlimited triggers, 30 seconds before rearming
- fill or kill bet with 360 seconds delay
Conditions:
- unmatched bets on the current selection = 0
- available lay liability > 0.5 (starts with 100)
liability.jpg
The trade above took all of the available liability (100). I would have thought that I had appropriate delays in place to be able to get confirmation of a previous trade and its liability information

My questions:
How does the last order trigger before the unmatched order is filled?
Why is the next order timed exactly to the second that the previous order ends, on every occurrence? (I've set a 30 second rearming delay)


The same has just happened again while I was watching
Rasmus.jpg
stake 0.89 was filled, unmatched bet for 36.15 then sat in unmatched window, then when the price moved it filled twice.

8/03/2025 15:04:08: [G_Auto 1] : Store Value for Rasmus Neergaard-Petersen: available_liability = 100 - 2.393 = 97.607
8/03/2025 15:04:09: [G_Auto 1] : $ 36.15 Lay bet placed on Rasmus Neergaard-Petersen at 3.7. Fully matched at 3.7. Ref: 10074 ( Fill or kill bet with 360 seconds delay. )
8/03/2025 15:04:09: [G_Auto 1] : $ 36.15 of unmatched bet (Ref:10067) was filled before remainder was killed.
8/03/2025 15:04:14: [G_Auto 1] : Store Value for Rasmus Neergaard-Petersen: available_liability = 100 - 197.603 = -97.603

Any suggestions welcome to get the timing right. I'm stumped
You do not have the required permissions to view the files attached to this post.
jtrader
Posts: 211
Joined: Thu Feb 09, 2017 11:35 am

You could try these :

- Increase rearming time ;

- Adjust your refreshing time - ensure if you have a lot of markets on Guardian rules could trigger properly on all of them ;

- Include - 'Fill or Kill Bet Time condition' ;
pj007
Posts: 3
Joined: Sun Sep 08, 2024 7:20 am

Great! Thank you.
I've added the Fill or Kill condition. That sounds like the missing one. Just saw an unmatched trade get matched without a duplicate.

Can I check...?
I'm guessing that the rearm is after the rule triggers, not after the bet fills or unmatched bet fills. Is that correct? That's where my thinking was wrong.
Does any internet delay or interruption between my computer and the server have a role with bet input & output getting out of sync? e.g. If so, how do I mitigate that?
jtrader
Posts: 211
Joined: Thu Feb 09, 2017 11:35 am

Rearming is that interval which .baf file checking if all conditions are executed to trigger ; Triggering is that action of .baf file when all conditions are executed.
Post Reply

Return to “Bet Angel - Automation”