Custom rake back stat (Players)

Discuss how to create custom stats, reports and HUD profiles and share your creations.

Moderators: WhiteRider, kraada, Flag_Hippo, morny, Moderators

Custom rake back stat (Players)

Postby timhuntley93 » Tue Jun 06, 2023 6:29 pm

A while ago I made a rakeback stat that would work for pokerbros for hands and I'm trying to do another for players. I thought I followed the same concepts but am getting an invalid SQL error. Could someone tell me where I went wrong on this column?

if[ cash_limit.amt_bb = 1.00 and cash_hand_summary.id_site=4700 and (amt_rake<.5 or cash_hand_summary.cnt_players<4), (cash_hand_summary.amt_rake * ( (cash_hand_player_statistics.amt_won + cash_hand_player_statistics.amt_bet_ttl) / (cash_hand_summary.amt_pot - cash_hand_summary.amt_rake))) * .4, if[ cash_limit.amt_bb = 1.00 and cash_hand_summary.id_site=4700 and (amt_rake>.74 and cash_hand_summary.cnt_players>3), (cash_hand_summary.amt_rake * ( (cash_hand_player_statistics.amt_won + cash_hand_player_statistics.amt_bet_ttl) / (cash_hand_summary.amt_pot - cash_hand_summary.amt_rake))-.25),*.4 0]
timhuntley93
 
Posts: 18
Joined: Tue Jul 28, 2015 3:33 pm

Re: Custom rake back stat (Players)

Postby Flag_Hippo » Thu Jun 08, 2023 1:47 pm

The final *.4 is in the wrong place and you are missing a bracket for the nested IF. Bear in mind while the column expression will validate with those changes the statistic will not work as it also needs to be within a sum(if[exp, then, else]) statement:

Code: Select all
sum(if[cash_limit.amt_bb = 1.00 and cash_hand_summary.id_site=4700 and (amt_rake<.5 or cash_hand_summary.cnt_players<4), (cash_hand_summary.amt_rake * ( (cash_hand_player_statistics.amt_won + cash_hand_player_statistics.amt_bet_ttl) / (cash_hand_summary.amt_pot - cash_hand_summary.amt_rake))) * .4, if[ cash_limit.amt_bb = 1.00 and cash_hand_summary.id_site=4700 and (amt_rake>.74 and cash_hand_summary.cnt_players>3), (cash_hand_summary.amt_rake * ( (cash_hand_player_statistics.amt_won + cash_hand_player_statistics.amt_bet_ttl) / (cash_hand_summary.amt_pot - cash_hand_summary.amt_rake))-.25) *.4, 0]])
Flag_Hippo
Moderator
 
Posts: 14505
Joined: Tue Jan 31, 2012 7:50 am

Re: Custom rake back stat (Players)

Postby timhuntley93 » Sat Jun 24, 2023 4:42 am

Hey I appreciate the help as always. I just got back from Vegas and got to trying to create this stat and I'm getting wildly different values from my Hand stat, which I know is accurate. The columns for my hand stat are built as such

Code: Select all
if[ cash_limit.amt_bb = 1.00 and cash_hand_summary.id_site=4700 and (amt_rake<.5 or cash_hand_summary.cnt_players<4), cash_hand_summary.amt_rake * ( (cash_hand_player_statistics.amt_won +  amt_bet_ttl)  / (amt_pot - cash_hand_summary.amt_rake))* 0.4, if[ amt_won>0 and cash_hand_summary.id_site=4700 and cash_limit.amt_bb = 1.00 and amt_rake>.74 and cash_hand_summary.cnt_players>3, (cash_hand_summary.amt_rake * ( (cash_hand_player_statistics.amt_won +  amt_bet_ttl)  / (amt_pot - cash_hand_summary.amt_rake))-.25)* 0.4, 0]]

Is there something simple that I'm missing that would explain the difference? Maybe something to do with the copy/pasted amt_rake_attributed expression that breaks it in its current context? I hope this doesn't seem too tedious but I'm primarily making money from rakeback so the values are important for me, thanks in advance for any insight here.
timhuntley93
 
Posts: 18
Joined: Tue Jul 28, 2015 3:33 pm

Re: Custom rake back stat (Players)

Postby timhuntley93 » Sat Jun 24, 2023 5:26 am

I just noticed the missing amt_won>0 in the first if, then in my hand stat. It's fixed now but is somewhat irrelevant to my previous post. On a side note, if there's a better way to mark that I won the hand I'd appreciate knowing it as I currently have 1-2% inaccuracy due to missing rake on split pots. I apologize in advance for being so anal :D If it's something I just have to live with it's nbd.
timhuntley93
 
Posts: 18
Joined: Tue Jul 28, 2015 3:33 pm

Re: Custom rake back stat (Players)

Postby timhuntley93 » Sat Jun 24, 2023 6:04 am

I believe I wound up figuring out the issue although not the solution after thinking about why I needed the amt_won>0 when I first created the hand stat. I believe involving pots I lost in the calculation is what is throwing it off. When I filter for hands I won that were not split pots, both my hand and player stats give me identical numbers. So to ask a more concise question, how can I add a marker that I won (or chopped, ideally), the pot to my player stat? (and hand stat if there's a better way than adding amt_won>0)
timhuntley93
 
Posts: 18
Joined: Tue Jul 28, 2015 3:33 pm

Re: Custom rake back stat (Players)

Postby WhiteRider » Sat Jun 24, 2023 9:34 am

It seems like you made pretty good progress on your own!
The following is true if the player won any money in the hand, even if their net was negative.

cash_hand_player_statistics.flg_won_hand

Hopefully that gives you what you need, but let us know if you have any further questions.
WhiteRider
Moderator
 
Posts: 53972
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Custom rake back stat (Players)

Postby timhuntley93 » Mon Jun 26, 2023 1:27 pm

Thanks! For the most part I have everything working as it should although for some reason the Player stat doesn't work for 5/10 specifically (possibly higher as well but 5/10 is the highest I've played). The column is identical to all the others aside from specified rake, BB, and BBJ amounts and I've triple checked that the values are correct. Any idea what could be the cause or would this be better suited to a support ticket?


Code: Select all
sum(if[cash_hand_player_statistics.flg_won_hand and cash_limit.amt_bb = 10.00 and cash_hand_summary.id_site=4700 and (amt_rake<5.00 or cash_hand_summary.cnt_players<4), (cash_hand_summary.amt_rake * ( (cash_hand_player_statistics.amt_won + cash_hand_player_statistics.amt_bet_ttl) / (cash_hand_summary.amt_pot - cash_hand_summary.amt_rake))) * .4, if[cash_hand_player_statistics.flg_won_hand and cash_limit.amt_bb = 10.00 and cash_hand_summary.id_site=4700 and (amt_rake>5.59 and cash_hand_summary.cnt_players>3), (cash_hand_summary.amt_rake * ( (cash_hand_player_statistics.amt_won + cash_hand_player_statistics.amt_bet_ttl) / (cash_hand_summary.amt_pot - cash_hand_summary.amt_rake))-0.60) *.4, 0]])
timhuntley93
 
Posts: 18
Joined: Tue Jul 28, 2015 3:33 pm

Re: Custom rake back stat (Players)

Postby Flag_Hippo » Tue Jun 27, 2023 4:53 am

The issue might be with the hands so please attach your custom statistic and sample of hands to a Support Ticket and we can take a look at this.
Flag_Hippo
Moderator
 
Posts: 14505
Joined: Tue Jan 31, 2012 7:50 am


Return to Custom Stats, Reports and HUD Profiles

Who is online

Users browsing this forum: No registered users and 22 guests

cron
highfalutin