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