Author Topic: Adjust amount for match unmatched bets  (Read 5167 times)

Tags:
  • All members
  • Posts: 12
Adjust amount for match unmatched bets
« on: 22 Apr 2013, 22:14 »
Hello,
is there a possibility to adjust the amount for "match unmatched bets" in a relation with the new price? For example the original bet was a lay with 100€ and the price 2. So the amount to lose was 100€. When the price climb to 2.5 and the trigger match unmatched bets it should be the same amount to lose. Just 100€. So the new amount for this bet should be ca. 66 € and not 100€. The trigger has to match a few unmatched bets in a minute. So other possibilities like "cancel then lay" doesn't work.
Thanks for your help and sorry for my bad english!
SMT

  • All members
  • Posts: 490
  • Gender: Male
Re: Adjust amount for match unmatched bets
« Reply #1 on: 22 Apr 2013, 22:55 »
You may be able to use a constant.
Set constant layrisk = 100

Now set and Amount formula that reads ' layrisk/(lay_price-1) '
No of unmatched bets = 1

Use a cancel then lay trigger for unmatched bets as you correctly suggested with a trigger expression related to the price change.

So if you cancel the unmatched lay bet, it then changes to 0 and your trigger will fire a new bet again.

Improvise Adapt Overcome

  • All members
  • Posts: 12
Re: Adjust amount for match unmatched bets
« Reply #2 on: 23 Apr 2013, 07:41 »
Thanks for the idea. But this was it doesn't work because i have have several unmatched bets on one selection. But just one of the should get matched after several ticks. Not all of them. And when using "cancel then lay", the trigger cancel every unmatched bet on a selection!

  • Administrator
  • Posts: 8818
  • Gender: Female
*
Re: Adjust amount for match unmatched bets
« Reply #3 on: 23 Apr 2013, 09:26 »
Hi smt,

BetFair does not allow you to change both the price and amount of your unmatched bet. So it is not possible to match a bet with a new size, you must cancel the old one and place a new bet.

Can you somehow define a criterion for the only bet you want to cancel, as compared to the other bets that must stay unmatched?
Always try your triggers in Test Mode before switching to real money!

Follow us on Twitter.

Join our WhatsApp chat!

Присоединяйтесь к официальному Telegram-каналу!

  • All members
  • Posts: 12
Re: Adjust amount for match unmatched bets
« Reply #4 on: 23 Apr 2013, 18:57 »
Hi Oxa,
the function is like a stop loss function. For example there are 4 lay bets on a horse, with prices 6.2, 6.4, 6.6 and 6,8. When the horse price reaches for example 4 ticks away from the bet, this bet should get matched with the new available price and an adjust amount. The other bets which did not reach 4 ticks should not get matched. If I take "cancel then lay", the trigger cancel all lay bets on a horse, not just the one which reached the 4 ticks. So that way doesn't work.
Thanks!

  • All members
  • Posts: 490
  • Gender: Male
Re: Adjust amount for match unmatched bets
« Reply #5 on: 23 Apr 2013, 19:48 »
So if the lay_price reaches 5.8 and you have the four bets mentioned 6.2,6.4,6.6,6.8 You propose the 6.2 will get matched (good luck!)

Therefore once lay_matched > 0 use a 'cancel lay'
Try explaining in a trigger map where "->" is Yes and "|" is no
Example:

Submit lay at 6.2
Is bet matched -> Cancel all remaining bets
             |
Cancel Lay - submit new bet at 6.0
Improvise Adapt Overcome

  • All members
  • Posts: 12
Re: Adjust amount for match unmatched bets
« Reply #6 on: 23 Apr 2013, 20:51 »
But all four bets should get matched, not just one.
I just want, that the bet get matched, like in a stop loss function, when the available horse price reaches four ticks.
The other three bets first should get matched, when they also individual reach 4 ticks.
I'll try a trigger map with lay bets with the back price:
Submit lay at 6.2

Horse climbs to 6.4 -> keep the 6.2 an set a second lay with 6.4

Horse climbs to 6.6 -> keep the 6.2 an 6.4 and set a third lay with 6.6

Horse climbs to 7 -> match the 6.2 with an adjust amount because reaching 4 ticks and keep the 6.4 and 6.6

Horse climbs to 7.2 -> match the 6.4 with an adjust amount because reaching 4 ticks an keep the 6.8

Horse climbs to 7.4 -> match the 6.8 because reaching 4 ticks

Thanks!

  • All members
  • Posts: 490
  • Gender: Male
Re: Adjust amount for match unmatched bets
« Reply #7 on: 23 Apr 2013, 22:40 »
I think you will need 12 triggers (4 remember, 4 lay, 4 cancels). Example names lay1, lay2, lay3 etc
When conditions are met cancel lay1 using a trigger that confirms number of unmatched lay bets = 4 [6.2,6.4,6.6,6.8]
AND lay_price > r_ticks(lay1_lay_price,4) using a remember trigger for lay1
So now you cancel lay1 and resubmit using your new amount.

Experiment, I think you can achieve your goal.
'remember' and 'number of runs per selection' will be helpful

Whats the final outcome?


 
Improvise Adapt Overcome

  • All members
  • Posts: 12
Re: Adjust amount for match unmatched bets
« Reply #8 on: 24 Apr 2013, 12:39 »
Thanks londolozi for the ideas, but it will not work. I make more than 500 bets in an hour, and for every bet the "stop-loss" function with adjust amount should work. So i will need 1500 triggers? Is that right?
I just see two ways:
1. Matching unmatched bets with the tick condition. So when a bet reaches the 4 ticks, first the amount get adjust and after that the bet get matched. Is there a function to adjust the amount of a bet?
2. The function "cancel than lay": Is there a condition, that this trigger cancel just one bet of a selection and not every bet of the selection?

Thanks!

  • All members
  • Posts: 490
  • Gender: Male
Re: Adjust amount for match unmatched bets
« Reply #9 on: 24 Apr 2013, 23:08 »
No, you won't need 1500 triggers  :P

One trigger block will just repeat itself each market.
Search  "market_id" in the user guide.
Improvise Adapt Overcome

 

Please note, BetFair is seems to be currently OFFLINE