Author Topic: Football trigger based on two related markets - trouble pulling back variables  (Read 3856 times)

Tags:
  • All members
  • Posts: 4
I'm trying to lay a selection depending on an expected profit that is calculated based on correct score odds and match odds.

I've been using "set user variable" to store the correct score odds per match (updating every refresh) using "market_parent_id" as part of the name. And I've done the same with the match odds. E.g. cs00_market_parent_id is the user variable for the odds of the score being 0-0 for a particular match.

My trouble is in calculating the expected profit.  Again I'm trying to set a user variable which I can then use in my lay trigger (i.e. when greater than >0), but when that profit calculation is triggered in the match odds market, it's tripping over the correct score variable.  Looking at the log it just shows cs00_27066504 in the calculation rather than pulling back the value e.g. 8 (which the cs00 trigger log is showing as being set). It is perfectly happy bringing back the match odds-based user variable though (ldp_market_parent_id, where ldp is my name for the variable).

But if the profit calculation is triggered in the correct score market, then it pulls back the correct score variables perfectly and trips over the match odds-based variable reporting ldp_27066504.

I thought that using the market_parent_id I'd be able to use variables across markets. What am I doing wrong? I've tried using the "remember" function too but I'm less comfortable with it and my calculations are done at a point in time rather than measuring changes over time, so I thought that setting user variables would work just as well. Either way, "remember" seems to have exactly the same effect - tripping out on variables that aren't directly part of the market the profit calculation is triggered within.

One other thing to mention - if the correct score/match odds variables are set to "globally" or rather than "individually for each market", then the variables are brought back fine (but obviously not correct if you have 2+ markets being watched at the same time), even though I have the market_parent_id in the variable name.

Any pointers would be gratefully accepted.
Guy

  • Élite
  • Posts: 3698
  • Gender: Male
*
hi
could you include your triggers, so that we can see and test them for the error.
to use the market_parent_id, you need to use cs00_market_parent_id_1_back_price , you can then calculate your expected profit.


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: 4
Thanks Mcbee.
I thought you'd ask. I'm clearly being a dullard here, but I can't see where I click to add an attachment.

I was aware of the _back_price addition if I used the "remember" action (is the 1 necessary?), but was thinking that by setting a user variable as the back price of a specific selection that I could avoid that.

  • All members
  • Posts: 4
Doh! Found it...
Here's a cut down version that displays the same issue (the original has a lot of large expressions so I thought I'd save you wading through them).  If I remove the conditions to check the variables are set the calculation just gets stuck at the same point.

  • Élite
  • Posts: 3698
  • Gender: Male
*
hi
sorry but you could not add a trigger etc until you had 5 posts, due to many none members just registering once and posting bad adverts.
your trigger took some working out, but i have managed to correct your mistakes.
you need to learn more about remeber/variables and market_parent_id.
look at your triggers and what should be, you can learn from these.

use test mode until you are happy with your settings

mcbee

download below
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: 4
Thanks McBee - I'll take a look.  But are you saying that I can't use the Set User Variable in this instance?  I struggle to understand when I should use that instead of the Remember function.

  • Élite
  • Posts: 3698
  • Gender: Male
*
hi
you use remember for the prices etc, but you use set variable for the calculation figure.


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.

 

Please note, BetFair is seems to be currently OFFLINE