LAYING SECOND FAV ONLY IF LAY ON 1st FAV IS MATCHED

Advanced automation available in Guardian - Chat with others and share files here.
Post Reply
Dr Ginhog
Posts: 260
Joined: Wed Nov 03, 2010 12:10 am
Contact:

Hi
I have been struggling to find a solution in automation
to the following- I wish to lay the fav pre-off at a particular low price and if matched lay the second fav also a minute later pre off.The problem is when the fav is not matched at the price how can I prevent the 2nd fav being bet.I thought maybe "time since last unmatched bet = 10 secs" might do it but not so. I can do it in excel easily enough.Any solutions for automation please??
User avatar
Dallas
Posts: 23489
Joined: Sun Aug 09, 2015 10:57 pm

Is this the only trade your doing on that market or are you trading other horse etc?
Dr Ginhog
Posts: 260
Joined: Wed Nov 03, 2010 12:10 am
Contact:

Hi,
These two are the only two trades but looking at your reply to another post I may have twigged the solution. When I put in a fill/kill set to 4secs which is less than the rearm of 5secs it now recognises the time since unmatched bet >10 secs when the 1st bet is matched. Is that why its working now and not before or am I on the wrong track?
Dr Ginhog
Posts: 260
Joined: Wed Nov 03, 2010 12:10 am
Contact:

Hi,
Now the 2nd fav is not being laid even when the 1st Fav is. Of course the fill/Kill has killed it.I shall have to have a rethink on what I am doing wrong.Maybe dallas will
have some idea?
Dr Ginhog
Posts: 260
Joined: Wed Nov 03, 2010 12:10 am
Contact:

Hi,
Ok now its working perfectly.
"time since unmatched bet >10 sec was the correct solution" after all
The kill/fill was not a factor but I had overlapped the times for both bets and when the 1st fav lay was taken late and within 10 secs of the end of the timeframe the 2nd Fav bet would not meet the > 10 seconds criteria and did not trigger. Lesson learned is check everything.
User avatar
Dallas
Posts: 23489
Joined: Sun Aug 09, 2015 10:57 pm

Glad you got it working
Dr Ginhog
Posts: 260
Joined: Wed Nov 03, 2010 12:10 am
Contact:

Hi,
As explained I only wanted the second bet to trigger if the first had already triggered.
I must admit that i encountered some other issues which
I think I now understand but are worth explaining here.
Because the timeframe of the first bet was separated from the second bets timeframe if the first bet lapsed due to not attaining correct price the first bet would lapse at the end of its timeframe and then "time since unmatched bet = 10 seconds" triggers for the second bet as no unmatched orders were available.To counter this I had to make both timeframes end on the same time to ensure the unmatched bet orders continued for the first bet. The first bet had an earlier start time from the second which gave both bets a chance of triggering. I hope that makes sense... now.
Another issue that occurred in the US market and could
occur in any market with low liquidity - The first bet matched piecemeal until fully matched near the end of the timeframe. In the meantime unmatched bets were continuing not allowing the second bet to trigger.
User avatar
Dallas
Posts: 23489
Joined: Sun Aug 09, 2015 10:57 pm

The way i would do it is instead of using the fill/kill and time since conditions remove both these and have your first bet just completely normal.

On your second bet add the following two conditions
"matched bets amount condition" and set it to lay bets equal to £0
"Green all profit condition" and set it to less than -£0.01

Now duplicate the 2nd bet rule (using the icon with 2 green arrows)
and on this edit the profit condition and set it to greater than £0.01

Now untill at least something is matched on your 1st bet your profit will be £0.00 and therefore 2nd bet wont trigger - as soon as any part of your first bet is matched your profit will of changed and now the 2nd bet will be allowed to trigger.

PS - If you want the 2nd bet placed X secs after the first then keep using the time since condition as well, and you can still use the fill/kill if you wanted to.

Finally if your not having your 2nd bet match at the current price and want to take lower odds just add unmatched bets condition equals 0
Dr Ginhog
Posts: 260
Joined: Wed Nov 03, 2010 12:10 am
Contact:

Hi,
Have to look over that in detail.Still learning this stuff. Looks great at first glance. No doubt your a master craftsman buddy and thanks.
Dr Ginhog
Posts: 260
Joined: Wed Nov 03, 2010 12:10 am
Contact:

One of the principal issues I have is that -The second bet must only be triggered if the first is triggered and the second bet must be triggered once the first is triggered.
To trigger the second bet I initially used “Time since bet unmatched > 8 seconds. Now this method is good 99% of the time but as both bets have the same
Timeframe end time(but different start times) if the first bet is matched within 8 second of the mutual end time the second bet will not be matched using that condition only. The only other type of condition that can work is a market condition rather than a selection condition. If a first bet is matched then with price fluctuations the market can only be in a negative Trade profit RED or a positive trade profit GREEN. A zero trade profit moment could occur for an instant only. It seemed like the best option was trade profit NOT zero, but if you write the conditions Trade profit < 0 and another > 0 in separate rule files If one of them fails does that defeat the trigger?
I have the same problem with the “Green all profit across all selections NOT Zero as a rule cannot be written afaik for this condition without using two rules one of which fails. Maybe I am getting the wrong end of the stick here. Is it ok to have two separate rules with one opposing condition. Can one rule work while the other fails? I have tried the trade profit > 0 & Trade profit < 0 in separate rules files but the second bet did not trigger after the first?
User avatar
Dallas
Posts: 23489
Joined: Sun Aug 09, 2015 10:57 pm

You can have seperate profit conditions within the same file just not on the same rule type
For example on the General tab of your rule it should look like this

Lay selection 1
Lay selection 2
Lay selection 2a

As per my earlier post Lay selection 1 is just set up normally including parameters etc.
For the other two lays as well as selecting your timing and parmeters etc they should also have the following.

Lay Selection 2 has the following conditions
"matched bets amount condition" and set it to lay bets equal to £0
"Green all profit condition" and set it to less than -£0.01

Lay Selection 2a has the following conditions
"matched bets amount condition" and set it to lay bets equal to £0
"Green all profit condition" and set it to greater than £0.01

By setting it up this way your first lay triggers and places bet as normal
depending on weather the price moves into a profit/loss (It ll more than likely use the loss one) it will trigger either
Lay selection 2
Lay selection 2a

Once one has triggered the "Matched lay bets amount condition" equals 0 on that selection will now prevent the other from triggering as your lay bet will now equal whatever stake size your using and not Zero anyore.
Dr Ginhog
Posts: 260
Joined: Wed Nov 03, 2010 12:10 am
Contact:

Hi,
Thanks for that dallas.That works well. The time since
unmatched bet" condition did not work all the time and so
your idea about green all profit which I set both at <0 and >0 in different files as you explained.
... Your a legend!
Post Reply

Return to “Bet Angel - Automation”