Author Topic: place bet and keep it until its matched or no longer acceptable  (Read 7624 times)

Tags:
  • All members
  • Posts: 314
Hi,

I want to be able to place a Lay bet in the soccer/correct score market, at half time, and I want to place a bet such that if the current correct score price is higher than 4.5, the bet is placed at odds of 4.5, and the bet is kept in place, asking for this price. Sure, if a goal is scored before this price is hit, then I have missed out.

I only want to place the bet on that particular score, at max odds of 4.5

So, if at half time, the score is 1-0, then, I want to place my bet where selection's index = 5, in the correct score market, and I want the max odds to be 4.5 or lower.

I realise that I have the ability to set a max_price constant to 4.5 and use the condition where lay_price is less than or equal to max_price, but, while the match is progressing, then, if a goal is scored, then my marketIndex variable will no longer be equal to 5, because we have a different scoreline... So, I am getting a little confused as to exactly what I need to do..

I have created a trigger that will provide me with a user variable, called marketIndex, which is calculated from checking the market_score1 and market_score2.. With some help from mcbee, I got this working.

Next, I then want to run a trigger at 50 minutes after the off, to be sure that we are in half time, and at this point, the marketIndex value is called, so we know which one to place the lay bet in..

This lay bet should attempt to place at max odds of 4.5, or below, but if the price does not meet this criteria, I am not sure how to keep the bet in place.... I want the bet to persist until the odds fall into this value

Can someone advise please?

Thanks

Mark.

  • Élite
  • Posts: 3694
  • Gender: Male
*
hi
in your laying trigger , where it say's Price (type 4.5) , then where it say's Cancel  (change to Keep)

so the lay bet will be placed at 4.5 if the price is lower you get the lower price , if the price is higher you wait until the price drops to 4.5 or less.

mcbee
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: 314
Hi mcbee,

Thanks for the response. I did already understand that I should use KEEP,

BUT, the way I am thinking, is, if I use a criteria in the trigger to say that the price must be at or below 4.5, then, if the price is above 4.5, then the trigger will not execute.

I have tried the trigger, and no bet is being place

Can you help, see attached...

Thanks

Mark.

  • Élite
  • Posts: 3694
  • Gender: Male
*
hi
you have your betting trigger set to idle , there is no score before the match starts.
change it to in-play


mcbee
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: 314
hi mcbee,

It still hasn't worked, just waited for a match that satisfies the criteria, between 50 and 60 after the off, marketIndex has been discovered to be 5, which is correct, the lay odds are 7.8 which is above the max_lay, the Lay CS trigger bet has been set to KEEP, and for both active triggers, the Market Status has been set to In-Play

Still no bet placed though?

any ideas?

see image

Thanks

Mark.

  • All members
  • Posts: 314
To add to this, I have just watched a bet get placed, via the trigger, and that was because the odds were below the max_lay price of 4.5...

I think, because the criteria of max odds is not being met, then the trigger is not even attempting a bet. This was my concern before

Thanks

Mark.

  • All members
  • Posts: 314
Is there a way to tell the trigger to do the following...

If the odds are above 4.5, then place a bet at 4.5, otherwise just place the bet?

  • All members
  • Posts: 314
Oh dear....

This is so simple, and was totally missed...

The way to do it, and make sure it places the bet, no matter what the odds are, is to do the following in the trigger...

lay Price maxLay Amount (whatever)

the variable maxLay is set to your choice..

Just did it, and it worked.

  • Élite
  • Posts: 3694
  • Gender: Male
*
hi

Quote
in your laying trigger , where it say's Price (type 4.5)
i did tell you before how to do it.

mcbee
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: 314
mcbee,

Yes, you did. Please accept my humble apologies...

I think my lack of understanding caused me not to take this as your meaning.

thanks for your help,

Sorry I can be a dumb a** sometimes!

  • All members
  • Posts: 314
Now, I want to expand on this, and look at doing a drip lay, in 10, single tick intervals...

so, if I have 10 triggers, say t1 to t0

So, my thinking is to set the Price at r_ticks(bm_laya, -1)

and so, in t2, I can set the price as (bm_laya, -1) AND have the condition that t1 'Lay Matched number of runs = 1'

in t3, I can set the price as (bm_laya, -1) AND have the condition that t2 'Lay Matched number of runs = 1'

.
.
.
in t10, I can set the price as (bm_laya, -1) AND have the condition that t9 'Lay Matched number of runs = 1'


Is my logic correct? is bm_laya the last matched lay price in this selection, at every point?

Thanks

Mark.

  • All members
  • Posts: 314
Something else I just noticed...

Even though I set my bet to KEEP, after looking at the latest bet, it is not actually set to KEEP

See image...

The only way I can KEEP this bet, is to click the Keep button..

Is there a way to force it to KEEP?

Thanks

Mark.

  • Élite
  • Posts: 3694
  • Gender: Male
*
hi
betfair has control of the keep and sometimes they select cancel.
there are certain match types that are restricted to cancel only for some reason.
your expanded version would be better to use 
for the first bet
and markets number of matched lay bets is equal to 0
for the second bet
and markets number of matched lay bets is equal to 1
and so on for the ten triggers.

mcbee 
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: 314
Hi,

OK, it looks like all has worked fine, and over the weekend, testing, it worked as expected.

As before, I want to expand this, and look to drip lay the correct score. The amounts are not important, but, what is important is that I only place the bet AFTER the previous bet has been matched, AND also, I need to know that the index of the correct score market is the same as the original, and so, if for example when the first bet is placed, the score is 1-1, then the index in the CS market is 6. So, I place a bet of £1 at either the current price, or, if the price is not at 4.5, then set the bet for odds of 4.5...

There are 2 situations here,

1. The current price is 5.2, and so, we must place the bet, and wait until it reaches 4.5

OR

2. The current price is 3.8, and so, the bet gets taken at 3.8

Given these 2 situations, I want to be able to place the NEXT bet, say 2 ticks lower than the first 1, and once that is matched, place another bet, 2 ticks lower than the previous 1.

So, in 1. above, first bet is placed for £1 at odds of 4.5, then waiting, price reaches 4.5 and bet is placed, then, next trigger has been waiting to see that previous trigger has been fired and executed, and checks triggers number of runs = 1, and if so, places the next lay bet of £1 at odds 2 ticks lower, so, places bet of £1 at odds of 4.3. Next bet placed, £1 at 4.1, Next £1 at 3.95, Next £1 at 3.85 etc etc...

Now, given that my marketIndex value trigger has now expired, because the time is now at 70 minutes after the start of play, and the original marketIndex HAD a value of 6, then, how do I KEEP this marketIndex value, specific to the selection, in some variable, such that a new check on the current index will compare against each other and decide if they are now the same index or if another goal has been scored, at which case, not further bets should happen..

Now, all the above, is based on criteria 1. being satisfied, but, if we now have criteria 2. being satisfied, i.e. odds are below 4.5, then we need to look at placing the NEXT bet, 2 ticks below the previous matched bet.

I can't workout how to do this process.

So, in summary, I want to be able to do the following, for EACH selection:

1. look to place a bet at current market index, AND remember this initial index, AND remember the price it placed the bet at
2. look to place a further bet, X number of ticks below the previous, AND make sure the index is still the same
3. repeat step 2 until each small bet has been placed - which to me, is effectively a drip lay

As far as progress in this is concerned, I know that if I want to drip lay using 10 increments, then, I develop 10 triggers, and each trigger checks the number of runs of the previous trigger is set at 1, no problems, I understand that.

I want to be able to remember the original market index, and store this PER SELECTION, and then, remember the previous price where the bet was matched and place the next bet at X ticks below.

Hope that is clear?

Can you give me some help please?

Thanks

Mark.

  • All members
  • Posts: 314
hi,

OK, I have wrote most of the trigger, in a way that I THINK is correct. The only thing I don't know, is what the score was at the time of the FIRST BET, at a point in time AFTER the time boundary of marketIndex has expired, i.e. into the second half.

So, if I set the time boundary as between 50 and 60 minutes AFTER the kick off, (minutes since the off) in the marketIndex variable, this is inside the half time period. If the score is 1-1 at that time, then the value in marketIndex will be 6.

For the purposes of making this shorter, I decided to look at drip laying 5 times, with 2 tick increments. The triggers are CS1 to CS5, and for each of these, the time for the trigger to run is set as mao (minutes after the off), and this is 50 minutes...

The initial Trigger, CS1, has the following conditions...
Market's Minutes Since the Off is greater than mao
and Selection's Index is equal to marketIndex



In each of the following  4 triggers, CS2 to CS5, the conditions are
"CS2"
Market's Minutes Since the Off is greater than mao
and Selection's Index is equal to marketIndex
and Trigger CS1 Number of runs > 0

"CS3"
Market's Minutes Since the Off is greater than mao
and Selection's Index is equal to marketIndex
and Trigger CS2 Number of runs > 1

"CS4"
Market's Minutes Since the Off is greater than mao
and Selection's Index is equal to marketIndex
and Trigger CS3 Number of runs > 2

"CS5"
Market's Minutes Since the Off is greater than mao
and Selection's Index is equal to marketIndex
and Trigger CS4 Number of runs > 3


And, as can be seen, the marketIndex has a set time limited time, between 50 and 60 minutes, and so, hopefully this is obvious that the marketIndex cannot change during this period, because its half time, and the first trigger, CS1, will execute, and place the bet....

So, hopefully, you can see that this has the problem, because the first bet MUST be placed during half time, and yet, once this bet criteria has been satisfied and the first bet has been placed, then, after the start of the second half, anything can happen, and so, CS2 to CS5 will only look to place their bets, according to the marketIndex criteria, BUT, this variable has expired.

I need to be able to somehow set this marketIndex AT THE HALF TIME point, into another variable that will persist, and so, in the example above, the score at the half time was 1-1, which gives the index as 6, I want to store this value somehow, while the match continues, and the other CS2 to CS5 triggers have not been matched, and if after 10 minutes into the second half, the score is 2-1, then the triggers will look to place the bet at index = 6, which of course, will fail.

I appreciate I have been very verbose here, but hopefully this is very clear. I simply need to be able to store the market's index at the half time point, and use only this index to place the bet, in subsequent triggers, BUT marketIndex has expired after half time, so I need to store this value somehow.

please help....

Thanks

Mark.

 

Please note, BetFair is seems to be currently OFFLINE