Author Topic: back and lay book  (Read 4884 times)

Tags:
  • All members
  • Posts: 83
back and lay book
« on: 02 Nov 2013, 10:43 »
Hi all

I'm just experimenting with b_book and l_book with a view to using them in one of my triggers.
At the moment I'm just writing their values to action log when my trigger fires so that I can determine exactly how to use them in an additional condition.

However, the values being written to the log are just the percentage chance of selection 1 happening rather than the %book for the whole market.

I guess this is because either:
One of the conditions of the trigger is that Selection's index = 1; or
I only have selection 1 activated for auto trading.

But I thought a market variable was exactly that and should be returning a figure for the whole market?

  • Élite
  • Posts: 3698
  • Gender: Male
*
Re: back and lay book
« Reply #1 on: 02 Nov 2013, 11:26 »
hi
i have just tested this and it works as it should, b_book=105.78 and l_book=98.67

you must write your text like this
lay book% [l_book]
back book% [b_book]
make sure that you include the [ and ] , before and after the required value.
so the trigger action
write to action log            lay book% [l_book]



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: 83
Re: back and lay book
« Reply #2 on: 02 Nov 2013, 12:01 »
Thanks Mcbee.

Yes, I had Text : lay book = [l_book] and back book = [b_book]

The log message was : lay book = 29.41 and back book = 29.85

 ???

  • Moderator
  • Posts: 3597
*
Re: back and lay book
« Reply #3 on: 02 Nov 2013, 12:15 »
Hi
The l_book and b_book variables will return the book% for the selections active for auto-trading. Example if you have 1st 3 selections active, it will return the book% for those 3 selections only. If all selections are active for auto-trading, it will return the book% for all selections.
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: 83
Re: back and lay book
« Reply #4 on: 02 Nov 2013, 12:25 »
Thanks Mark.

I would like to work with the book % for the whole market, but I don't really want to activate all selections since it slows my trigger.

I don't suppose you could suggest a workaround?

  • Moderator
  • Posts: 3597
*
Re: back and lay book
« Reply #5 on: 02 Nov 2013, 12:48 »
Hi
I can't see how it can be done because triggering is disabled on the other selections, so can't update a user variable etc.
There is possibly a way using an Excel sheet and another profile, but this will slow it down even more, so I don't think it is feasible.

If I think of something further I will post.
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: 83
Re: back and lay book
« Reply #6 on: 02 Nov 2013, 13:01 »
Thanks; I thought you might say that! 

I'm just a bit baffled as to why I can see the back and lay book percentages at the top of the MF screen, but I can't use them without enabling auto trading on selections I'm not interested in.

Or to put it another way, wouldn't it be better if l_book and b_book automatically returned a figure for the whole market rather than just activated selections?

  • Élite
  • Posts: 3698
  • Gender: Male
*
Re: back and lay book
« Reply #7 on: 02 Nov 2013, 14:02 »
hi
if you type or copy this in the text part of the write to action log, it will give you what you want, the exact back book%.

back book% [100/s_1_back_price+100/s_2_back_price+100/s_3_back_price+100/s_4_back_price+100/s_5_back_price+100/s_6_back_price]


for the lay price just change the back in to lay.
you must monitor at least 1 selection for this to work

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.

  • Moderator
  • Posts: 3597
*
Re: back and lay book
« Reply #8 on: 02 Nov 2013, 15:49 »
Hi mcbee
that works for markets with exactly 6 selections
if I add +100/s_7_back_price to the formula, in a 6 selection market it does not work.
it will be difficult to adjust the formula on the fly relative to the number of selections in a market. Ideally we want a formula that will handle any number of selections.
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.

  • Élite
  • Posts: 3698
  • Gender: Male
*
Re: back and lay book
« Reply #9 on: 02 Nov 2013, 17:38 »
hi mark
sorry, you are correct, it would only be good for fixed runner number markets.
i am now trying to get a formula or trigger to do the job.

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.

  • Élite
  • Posts: 3698
  • Gender: Male
*
Re: back and lay book
« Reply #10 on: 02 Nov 2013, 18:21 »
hi
this will cover selections from 1 to 20, copy and paste the formula in to the text box of the write to action log, it is a bit long but i cannot see any other way,because you cannot divide a number or zero by 0, but you can devide zero by a number without an error

100/s_1_back_price+IF(runner_number>1,100,0)/IF(runner_number>1,s_2_back_price,1)+IF(runner_number>2,100,0)/IF(runner_number>2,s_3_back_price,1)+IF(runner_number>3,100,0)/IF(runner_number>3,s_4_back_price,1)+IF(runner_number>4,100,0)/IF(runner_number>4,s_5_back_price,1)+IF(runner_number>5,100,0)/IF(runner_number>5,s_6_back_price,1)+IF(runner_number>6,100,0)/IF(runner_number>6,s_7_back_price,1)+IF(runner_number>7,100,0)/IF(runner_number>7,s_8_back_price,1)+IF(runner_number>8,100,0)/IF(runner_number>8,s_9_back_price,1)+IF(runner_number>9,100,0)/IF(runner_number>9,s_10_back_price,1)+IF(runner_number>10,100,0)/IF(runner_number>10,s_11_back_price,1)+IF(runner_number>11,100,0)/IF(runner_number>11,s_12_back_price,1)+IF(runner_number>12,100,0)/IF(runner_number>12,s_13_back_price,1)+IF(runner_number>13,100,0)/IF(runner_number>13,s_14_back_price,1)+IF(runner_number>14,100,0)/IF(runner_number>14,s_15_back_price,1)+IF(runner_number>15,100,0)/IF(runner_number>15,s_16_back_price,1)+IF(runner_number>16,100,0)/IF(runner_number>16,s_17_back_price,1)+IF(runner_number>17,100,0)/IF(runner_number>17,s_18_back_price,1)+IF(runner_number>18,100,0)/IF(runner_number>18,s_19_back_price,1)+IF(runner_number>19,100,0)/IF(runner_number>19,s_20_back_price,1)


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: 83
Re: back and lay book
« Reply #11 on: 02 Nov 2013, 18:46 »
Thanks Mcbee

Working fine for me (adapted to correct number of runners).  Much appreciated.

Would still be interested to know why the default b_book or l_book couldn't be made to do the trick, but I'm more than happy with my longhand solution for now.

 

Please note, BetFair is seems to be currently OFFLINE