Author Topic: bsp details  (Read 52 times)

  • All members
  • Posts: 221
  • Karma: +1/-0
bsp details
« on: Mon, 14 May, 2018, 14:39 »
Hi,

First off, apologies to those have helped me previously, and didn't receive a thank you response!, so Thanks for your help..

I am back with my begging bowl again, as I have tried so many ways to get a trigger to do exactly what I need, and I have failed to achieve what I wanted, and so, I end up sitting at my desk, watching the races to make sure the trigger is doing as I expected, and if not, take manual action.

I am still stuck on the Laying, then backing out part, if the actual_sp is outside my required price range...

Simple enough strategy, except, if there are multiple strategies running, my trigger ends up staking on the wrong item, or it places a stake 'incorrectly'

That is a bold statement, and I am of the opinion, that the fault is with ME, but I am just using language as I see it, so please don't think I am being abusive toward MFP...

Anyway, enough of my droning, on with the questions..

I have a number of strategies, each of which are Laying.. Some of the strategies will share the same selection, and so, for each strategy, I have a separate trigger, which I am trying to get to conform to the rules of the strategy..

So, first, I have strategy V1, it is a laying strategy, which is set where the actual_sp is between 19.01 and 35..

Of course, I cannot set this up via the trigger, such that I set the maximum sp price to be 35, as this is not a valid tick entry, and so, I set the max price to be 36.

Also, 19.01 is also not a valid price in terms of betfairs tick system, and so, I set the trigger up with a BACK out trigger...

so, to show this, via an image, please see the attached image (Trigger).

So, from the V1 Lay, I am asking it to lay at SP, with a price limit of 36, with a liability of £13.20, using any selections within the V1 text file. I have taken the lowest point to be 19, rather that 19.01, as 19.01 again, is not really a valid price, and the Lay at SP bet is placed, if within the criteria, around 3 - 4 seconds before the scheduled off - this job is finished, and if the price is at or below 36, the SP bet will be taken...

When the SP bet is placed, I have an action in place to log the placed bet, and this is kind of where things get a little more complicated, as will be discussed...

That's the easy part...

Next...

Once we reach In Play, the V1 Post Back trigger will inspect the V1 text file, within the SP folder, to check if a selection matching is contained within.

This is where the problems start, because, if the SP bet falls outside the criteria set by the trigger, the selections name is still added to the V1 SP text file, BUT, the SP bet will not be placed..

And so, the V1 Post Back will see there is an entry in the V1 SP txt file, and it will also see that the actual_sp is outside 19.01 and 36, and will then proceed to place a back bet, using the liability amount (stake), given by V1Liab / (actual_sp - 1)...

Problem is, on occasions, when the SP bet has not gone through, the V1 Post Back will see an entry in the text file, and place a back bet, which I call the Back Out bet...

If you look at the second image (bobs girl), 14:20 race, the V1 Backout bet was placed, because an entry was made in the V1 SP text file, and was not satisfied, because Bobs Girl went off at BSP 60.59, and so, by manual interaction, I had to place a LAY bet, to cover the 18p place, and fortunately, the odds at the time were in the 30's range, so I took advantage and layed at 25p rather than 18p....

So, after this, I went through the MFP user manual, to see if I could figure out a way to determine if a bet had actually been placed, and so, on page 141, I can see the bsp_ values, which relate to SP bets, and my best conclusion, was to use bsp_number, and as a quick reference to these values, see attached image (bsp_number), which shows s_4_sel_name, s_4_actual_sp, and s_4_bsp_number, and looking at the MFP above the user variables, the 3 SP lay bets placed on Gortnagirl, whose actual_sp was 17.64, I would have expected s_4_bsp_number to show a value of 3, but instead, it shows 0?

And so, of course, exasperated, I have had to come back to get some advice, on where I am going wrong?

In summary, I want to place a SP bet, and if the actual_sp is outside my acceptable range, I want to back out, BUT, I have multiple strategies, which can share a selection, BUT, with differing price ranges, and I want to be able to specifically check EACH one, where maybe only 1 of them satisfies my criteria...

This is why I have a separate text file which is written to, for each strategy, and my back out bet checks for an entry..

I cant figure out how to get this perfect, and I am still chained to my desk in case of problems, so I need a third eye to glance over this..

Thanks for reading, apologies for the length...

Mark.