[Custom Stat] Shove % while M is small

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

Moderators: WhiteRider, kraada, Flag_Hippo, morny, Moderators

[Custom Stat] Shove % while M is small

Postby sty_silver » Thu Jan 04, 2024 2:34 pm

I'm trying to create a custom stat about how often a player shoves given that their M is small. It would be limp_open_shove / limp_open_shove_opp, where limp_open_shove_opp is defined as "M < 5 and player_can_open_pot", i.e.:

Code: Select all
sum(if[live_tourney_player.amt_stack / (live_tourney_table.amt_bb + live_tourney_table.amt_sb + (live_tourney_table.amt_ante * live_tourney_table.cnt_players)) < 5 and tourney_hand_player_statistics.flg_p_open_opp, 1, 0])


The problem is that the first condition about the M value (everything before the "and") is only evaluated once, and makes the entire column either 0 (if it resolves false) or leaves it unaffected (if it resolves true). What I want, of course, is that it is evaluated separately for each hand, just as the field tourney_hand_player_statistics.flg_p_open_opp. I also tried reducing it to just one condition (e.g., live_tourney_player.amt_stack < 1000) to test, and it's the same issue. I assume I'm using the wrong fields, but which fields should I use instead?

(limp_open_shove has the identical problem, so the definition doesn't really matter.)
sty_silver
 
Posts: 2
Joined: Tue Nov 22, 2016 4:38 pm

Re: [Custom Stat] Shove % while M is small

Postby Flag_Hippo » Fri Jan 05, 2024 8:51 am

Data from the live table isn't stored in the database and it's not possible to mix data from the live tables with other database tables. To calculate the players M you will need to use this:

Code: Select all
(tourney_hand_player_statistics.amt_before / (tourney_blinds.amt_bb + tourney_blinds.amt_sb + (tourney_hand_player_statistics.amt_ante * tourney_hand_summary.cnt_players)))
Flag_Hippo
Moderator
 
Posts: 15174
Joined: Tue Jan 31, 2012 7:50 am

Re: [Custom Stat] Shove % while M is small

Postby sty_silver » Fri Jan 05, 2024 10:56 am

Awesome. Thanks! Full formulas (in case someone wants to copy them):

Open Shove with M < 5 (stat):
Code: Select all
(cnt_p_openshove / cnt_p_openshove_opp ) * 100


cnt_p_openshove (column):
Code: Select all
sum(if[(tourney_hand_player_statistics.amt_p_raise_made >= tourney_hand_player_statistics.amt_p_effective_stack and tourney_hand_player_statistics.flg_p_first_raise and tourney_hand_player_statistics.flg_p_open_opp and (tourney_hand_player_statistics.amt_before / (tourney_blinds.amt_bb + tourney_blinds.amt_sb + (tourney_hand_player_statistics.amt_ante * tourney_hand_summary.cnt_players))) < 5), 1, 0])


cnt_p_openshove_opp (column):
Code: Select all
sum(if[(tourney_hand_player_statistics.amt_before / (tourney_blinds.amt_bb + tourney_blinds.amt_sb + (tourney_hand_player_statistics.amt_ante * tourney_hand_summary.cnt_players))) < 5 and tourney_hand_player_statistics.flg_p_open_opp, 1, 0])
sty_silver
 
Posts: 2
Joined: Tue Nov 22, 2016 4:38 pm


Return to Custom Stats, Reports and HUD Profiles

Who is online

Users browsing this forum: Google [Bot] and 14 guests

cron
highfalutin