Author Topic: Variables to use  (Read 2915 times)

Tags:
  • All members
  • Posts: 1
Variables to use
« on: 06 Dec 2010, 10:32 »
Hi,

I would like to write a very simple green up trigger, but without using the green up function. Firstly, here the reason why the greenup function does not work me.
Let's say I lay at $15.00 at 7.40 and in the next round the odds jumps to 42.80.

According to any Hedging calculator, the amount to back would be $2.59. The problem is that the minimum bet amount is $4 and because of this, the greenup function does not work.

I would like to include an if statement:  if the back amount is smaller than 4, then place a bet of 4, otherwise place the calculated back amount.

The formula to calculate the back amount is "Back Odds / Lay Odds * Lay Amount"

Now the question is, which variables do I use?
I tried "back_price / bm_layp * bm_laya", but this give me the wrong answer.
The if statement reads:
if(back_price/bm_layp*bm_laya < 4, 4, back_price/bm_layp*bm_laya)

Could someone be so kind as to advise where I made my mistake?

Thanks

  • All members
  • Posts: 905
Re: Variables to use
« Reply #1 on: 06 Dec 2010, 12:37 »
No need to bother with any of that.

All you need to do is go to Betting Options and tick the box - 'Automatically adjust bet size if it is below the allowed minimum'   The green-up function will then operate as you require.

 

Please note, BetFair is seems to be currently OFFLINE