How to close a trade after 10 minutes if making a loss

Advanced automation available in Guardian - Chat with others and share files here.
Post Reply
TQO23
Posts: 4
Joined: Mon Mar 19, 2012 4:50 pm

Hi All. Long post, apologies but I want to give as much info as possible.

Definite "newbie" to this (roll on next week when I go on a Bet Angel course).

Been watching the videos and have succesfully created the "Lay the Draw" rule which I've applied to a few matches.

What I'd like to do now is create a similar rule for the Over 2.5 goals market but I want to close the trade after a predetermind time. My theory is that if no goals have been scored the odds of there being Under 2.5 goals improve and I should be able to green up in profit. If a goal has been scored I just want to close the trade at a loss (dependent on the back price at that stage). I'm using 2.5 goals as an example but could test in practice mode with other Over/Under combinations once I get the coding right.

Hopefully I've explained that correctly and used the right terminology.

So my Lay Over 2.5 Goals rule looks like this:

Rule 1 - Place Lay bet
General
Place Lay Bet relative to event Start Time
5 minutes before event start time
Allow rule to trigger 1 time
Applies to row two of BetFair (which is the Over 2.5 goals) market

Parameters
Place at - Best Market price
Stake - a %age of balance = 5%

No Conditions

Rule 2 - Take profit (greening Up?) after predetermined time (say 12 minutes)

General
Green All Selections
Relative to In Play time
Arm Trigger at 00:00:00
Until 12 minutes after event start time
Allow rule to trigger 100 times, wait 60 secs before rearming

Parameters
None

Conditions
Green All Profit Condition
green all profit is >0

Rule 2 I think takes care if I'm in profit after 12 minutes but I'm guessing I now need to add a Rule 3 which closes the position if a goal has been scored in the first 11 minutes and 30 seconds and I'm making a loss. I will test this but here's my first attempt which I'd welcome your comments on:

Rule 3 - Close trade at a loss if goal scored within first 11 mins 30 secs

General
Close trade on Selection
relative to In Play time
Arm trigger 00:00:00
Until 00:11:30
Allow rule to trigger 100 times, wait 60 secs before rearming
Applies to row two of selection (the over 2.5 goals market)

Parameters
None

Conditions
1. Time since unsuspended is greater than 30 secs (hopefully a second goal wouldn't be scored within 30 seconds of the first)
2. close trade profit Condition where trading profit is <0

Any comments or amendments gratefully received.

regards

Nigel
TQO23
TQO23
Posts: 4
Joined: Mon Mar 19, 2012 4:50 pm

Well practice mode in Bet Angel is worth its weight in gold as the Unsuspended time condition meant that it closed the trade immediately after the game started (because betfair suspends the market until its In Play I assume).

Have removed the unsuspended time condition and just allowed it to close the trade after 11:30 IF there is a losing position.

Will ask at the course next week if I can't get it sorted as I'd still like to have it detect a goal and then close after a suspension.
Boing
Posts: 134
Joined: Thu Feb 23, 2012 4:06 pm

Why not add a condition to check profit, if your are at a loss then close the trade. That should stop it from triggering if there is a suspension but no goal.
TQO23
Posts: 4
Joined: Mon Mar 19, 2012 4:50 pm

Boing wrote:Why not add a condition to check profit, if your are at a loss then close the trade. That should stop it from triggering if there is a suspension but no goal.
Hi Boing and thanks for responding.

I actually thought I was doing that with the Check Profit <0 after 11mins 30secs which is the only line I have in for rule 3 now. I took the unsuspended line out because I will be in a losing position due to time lag. I

I couldn't check last night but will run again in practice mode this evening.

Will report back
Post Reply

Return to “Bet Angel - Automation”