Author Topic: lay triggers to work independently  (Read 4413 times)

Tags:
  • All members
  • Posts: 829
lay triggers to work independently
« on: 03 Apr 2013, 07:49 »
hi,
I have two lay triggers and I want them to work separately
but within the same block of triggers.
I have set the condition 'unmatched lay' bets at 2
But I don't want two lay bets waiting to be matched from the one trigger.
eg: if trigger 1 fires in an unmatched lay bet and remains unmatched.
And then trigger 1 fires in another unmatched lay bet that takes up the
total quota of unmatched lay bets. Which means trigger 2 has no chance of firing in a lay bet.
How can I code it to identify that one unmatched lay bet exists for trigger 1 and trigger 1 cannot fire in any more lay bets but trigger 2 can fire in one lay bet if
conditions apply. ?
Thanks if you can help
R

My grandma taught me not to run downstairs and never back odds on.

  • Moderator
  • Posts: 3597
*
Re: lay triggers to work independently
« Reply #1 on: 03 Apr 2013, 07:58 »
Hi
In Trigger 1 add a condition
and Trigger 1 number of runs is less than 1

In Trigger 2 add a condition
and Trigger 2 number of runs is less than 1
Please read the following disclaimer with regards to the information you may request and obtain on our forum. This specifically concerns trigger files and various instructions as to how to implement a strategy.

  • All members
  • Posts: 829
Re: lay triggers to work independently
« Reply #2 on: 04 Apr 2013, 02:34 »
hi,
Thanks, I am testing it now and so far seems okay.
The problem now is too many matched back bets have been placed.
Ideally there should be equal matched back and lay bets. However
that is impractical but I am working out a formula to allow a 2 bet cushion.
something like this    (bm_backnum)-(bm_laynum)<3
I could place that in the back trigger and then
(bm_laynum)-(bm_backnum)<3
To be added to the lay trigger.
How does that look?
Thanks again.
R
My grandma taught me not to run downstairs and never back odds on.

  • Moderator
  • Posts: 3597
*
Re: lay triggers to work independently
« Reply #3 on: 04 Apr 2013, 12:22 »
Hi
In real mode you will inevitably have partially matched bets, which makes a mess of counting the number matched or unmatched bets. You will have better control if you rework the trigger to use actual amounts; bm_backa and bm_laya.
Please read the following disclaimer with regards to the information you may request and obtain on our forum. This specifically concerns trigger files and various instructions as to how to implement a strategy.

  • All members
  • Posts: 829
Re: lay triggers to work independently
« Reply #4 on: 04 Apr 2013, 21:03 »
hi,
thanks,
I am trying to write a condition that says:
    matched back amount - matched lay amount is less than 25.00
or matched lay amount - matched back amount is less than 25.00
is it something like:
    (bm_backa)-(bm_laya)<25
or (bm_laya)-(bm_backa)<25
is this the correct way to write it?
thanks
R
My grandma taught me not to run downstairs and never back odds on.

  • Moderator
  • Posts: 3597
*
Re: lay triggers to work independently
« Reply #5 on: 04 Apr 2013, 21:35 »
hi,
thanks,
I am trying to write a condition that says:
    matched back amount - matched lay amount is less than 25.00
or matched lay amount - matched back amount is less than 25.00
is it something like:
    (bm_backa)-(bm_laya)<25
or (bm_laya)-(bm_backa)<25
is this the correct way to write it?
thanks
R
Hi
bm_backa and bm_laya are the last non-SP back matched amount and last non-SP lay matched amount on the selection. The conditions using these are as below:
 
selection's trigger expression bm_backa - bm_laya is less than 25
or selection's trigger expression bm_laya - bm_backa is less than 25

so if you wanted to do the calculation on the last trade you would use the above.

If you want to do the same for the total back matched amount and total lay matched amount on the selection:

selection's back_matched - lay_matched is less than 25
or selection's lay_matched - back_matched is less than 25
 
Please read the following disclaimer with regards to the information you may request and obtain on our forum. This specifically concerns trigger files and various instructions as to how to implement a strategy.

  • All members
  • Posts: 829
Re: lay triggers to work independently
« Reply #6 on: 04 Apr 2013, 23:54 »
hi,
great, thanks again.
MFP is so versatile, and an efficient support team,
everybody should be using it.
R
My grandma taught me not to run downstairs and never back odds on.

  • All members
  • Posts: 829
Re: lay triggers to work independently
« Reply #7 on: 05 Apr 2013, 00:38 »
ahaa, I have just realised that this formula will stop after
25 has been matched.
I want no more than 25 extra matched bet  amounts at any one time.
eg: total matched back amounts = 150
      total matched lay amounts    = 175
The lay amounts exceed the back amounts by 25 so there won't be any more lay bets until more back bets are made.
apologies for any confusion
R
My grandma taught me not to run downstairs and never back odds on.

  • All members
  • Posts: 829
Re: lay triggers to work independently
« Reply #8 on: 05 Apr 2013, 06:37 »
as you were.......... The formula is correct.
It just takes the difference between the two.
I need more sleep :)
R
My grandma taught me not to run downstairs and never back odds on.

 

Please note, BetFair is seems to be currently OFFLINE