Custom Stat Effective BB Bet or Raised

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

Moderators: WhiteRider, kraada, Flag_Hippo, morny, Moderators

Custom Stat Effective BB Bet or Raised

Postby Steve.Dub » Tue Dec 18, 2018 11:40 pm

Hi, I'd like to calculate the average BBs bet or raised each street. If I bet & get raised, then call a raise, I don't want the call included in the total. Something like:

(amount bets made + amount raises made - amount call raises made) / (#bets + #raises)

And the final number relative to effective stacks. The goal is to have a stat that complements aggression frequency by showing the magnitude of said aggression. Or put another way, sum the total of bets that count towards AFq.

On the flop I got this far:

Code: Select all
sum( if[tourney_hand_player_statistics.flg_f_bet OR
tourney_hand_player_statistics.cnt_f_raise > 0, ((tourney_hand_player_statistics.amt_f_bet_made + tourney_hand_player_statistics.amt_f_raise_made) / tourney_blinds.amt_bb), 0])


But I'm not sure if the logic is correct, nor do I know how to subtract calls, nor is this calculated for effective stacks :| Any help appreciated!
Steve.Dub
 
Posts: 8
Joined: Fri Feb 07, 2014 1:27 pm

Re: Custom Stat Effective BB Bet or Raised

Postby Flag_Hippo » Wed Dec 19, 2018 2:16 pm

You are not going to be able to do that in a single column but rather a number of columns that cover all possible flop actions. Please note the following:

tourney_hand_player_statistics.amt_f_raise_made is the absolute size of the first raise made by a player and includes all previous bets/calls so if the players flop actions are 'BR' then you don't need to add tourney_hand_player_statistics.amt_f_bet_made.

tourney_hand_player_statistics.amt_f_raise_made_2 is the absolute size of the second raise made by a player and includes the first raise and previous bets/calls.

tourney_hand_player_statistics.amt_bet_f is the total amount wagered on the flop.

If a players faces a bet or raise and then calls you can get that value from:

tourney_hand_player_statistics.amt_f_bet_facing
tourney_hand_player_statistics.amt_f_2bet_facing
tourney_hand_player_statistics.amt_f_3bet_facing
tourney_hand_player_statistics.amt_f_4bet_facing


If you don't want to count bets and raises above the effective stacks then you can compare that to tourney_hand_player_statistics.amt_f_effective_stack.

As an example for all hands where no call was made by the player on the flop you could use these two columns (one for where the total amount bet was less than or equal to effective stacks and one for more than that):

Code: Select all
sum(if[tourney_hand_player_statistics.flg_f_saw and tourney_hand_player_statistics.amt_bet_f > 0 and lookup_actions_f.action NOT LIKE '%C%' and tourney_hand_player_statistics.amt_bet_f <= tourney_hand_player_statistics.amt_f_effective_stack, (tourney_hand_player_statistics.amt_bet_f / tourney_blinds.amt_bb), 0])

Code: Select all
sum(if[tourney_hand_player_statistics.flg_f_saw and tourney_hand_player_statistics.amt_bet_f > 0 and lookup_actions_f.action NOT LIKE '%C%' and tourney_hand_player_statistics.amt_bet_f > tourney_hand_player_statistics.amt_f_effective_stack, (tourney_hand_player_statistics.amt_f_effective_stack / tourney_blinds.amt_bb), 0])
Flag_Hippo
Moderator
 
Posts: 15186
Joined: Tue Jan 31, 2012 7:50 am

Re: Custom Stat Effective BB Bet or Raised

Postby Steve.Dub » Fri Dec 21, 2018 2:13 am

Thanks for your reply. Here are my assumptions:

When action doesn't include a call, use only the total amount wagered. Condition NOT LIKE '%C%'.

When action is bet/call, the amount bet or raised is tourney_hand_player_statistics.amt_bet_f - tourney_hand_player_statistics.amt_f_2bet_facing. Condition = 'BC'.

When action is raise/call, the amount bet or raised is tourney_hand_player_statistics.amt_bet_f - tourney_hand_player_statistics.amt_f_3bet_facing. Condition = 'RC'.

There isn't a flop 5 bet flag so RRC doesn't exist.

Column <= Effective Stacks Wagered

Code: Select all
sum(if[tourney_hand_player_statistics.flg_f_saw and tourney_hand_player_statistics.amt_bet_f > 0 and lookup_actions_f.action NOT LIKE '%C%' and tourney_hand_player_statistics.amt_bet_f <= tourney_hand_player_statistics.amt_f_effective_stack, (tourney_hand_player_statistics.amt_bet_f / tourney_blinds.amt_bb), 0],

if[tourney_hand_player_statistics.flg_f_saw and tourney_hand_player_statistics.amt_bet_f > 0 and lookup_actions_f.action = 'BC' and tourney_hand_player_statistics.amt_bet_f <= tourney_hand_player_statistics.amt_f_effective_stack, ((tourney_hand_player_statistics.amt_bet_f - tourney_hand_player_statistics.amt_f_2bet_facing) / tourney_blinds.amt_bb), 0],

if[tourney_hand_player_statistics.flg_f_saw and tourney_hand_player_statistics.amt_bet_f > 0 and lookup_actions_f.action = 'RC' and tourney_hand_player_statistics.amt_bet_f <= tourney_hand_player_statistics.amt_f_effective_stack, ((tourney_hand_player_statistics.amt_bet_f - tourney_hand_player_statistics.amt_f_3bet_facing) / tourney_blinds.amt_bb), 0])


Column > Effective Stacks Wagered

Code: Select all
sum(if[tourney_hand_player_statistics.flg_f_saw and tourney_hand_player_statistics.amt_bet_f > 0 and lookup_actions_f.action NOT LIKE '%C%' and tourney_hand_player_statistics.amt_bet_f > tourney_hand_player_statistics.amt_f_effective_stack, (tourney_hand_player_statistics.amt_f_effective_stack / tourney_blinds.amt_bb), 0],

if[tourney_hand_player_statistics.flg_f_saw and tourney_hand_player_statistics.amt_bet_f > 0 and lookup_actions_f.action = 'BC' and tourney_hand_player_statistics.amt_bet_f > tourney_hand_player_statistics.amt_f_effective_stack, ((tourney_hand_player_statistics.amt_f_effective_stack - tourney_hand_player_statistics.amt_f_2bet_facing) / tourney_blinds.amt_bb), 0],

if[tourney_hand_player_statistics.flg_f_saw and tourney_hand_player_statistics.amt_bet_f > 0 and lookup_actions_f.action = 'RC' and tourney_hand_player_statistics.amt_bet_f > tourney_hand_player_statistics.amt_f_effective_stack, ((tourney_hand_player_statistics.amt_f_effective_stack - tourney_hand_player_statistics.amt_f_3bet_facing) / tourney_blinds.amt_bb), 0])


For both of these columns, each individual if clause is validated by PT4, all three together are not valid. Missing some syntax there.

From these two columns, take the lower value and that's the sum of effective bets & raises. That number divided by cnt_f_saw gives the average of sum of flop bets & raises.

How did I do?
Steve.Dub
 
Posts: 8
Joined: Fri Feb 07, 2014 1:27 pm

Re: Custom Stat Effective BB Bet or Raised

Postby Flag_Hippo » Sat Dec 22, 2018 9:00 am

Steve.Dub wrote:When action doesn't include a call, use only the total amount wagered. Condition NOT LIKE '%C%'.

When action is bet/call, the amount bet or raised is tourney_hand_player_statistics.amt_bet_f - tourney_hand_player_statistics.amt_f_2bet_facing. Condition = 'BC'.

When action is raise/call, the amount bet or raised is tourney_hand_player_statistics.amt_bet_f - tourney_hand_player_statistics.amt_f_3bet_facing. Condition = 'RC'.

That's fine if you are playing heads up games or specify that the pot was heads up on the flop however if you want to include multiway pots your statistic is going to get alot more complex. For example if the action is 'BC' in a multiway pot then the call could have been versus a 3Bet+.
Steve.Dub wrote:There isn't a flop 5 bet flag so RRC doesn't exist.

flg_p_4bet includes any raise that's 4bet or higher so while there isn't a specific 5bet flag 'RRC' is still possible as a flop action which your currently not counting.
Steve.Dub wrote:For both of these columns, each individual if clause is validated by PT4, all three together are not valid. Missing some syntax there.

Each of those needs to go into their own individual column so instead of the two you posted you would have a total of 6 columns and you would then add them together in the value expression for your stat:
(A + B + C + D + E + F) / cnt_f_saw
Steve.Dub wrote:From these two columns, take the lower value and that's the sum of effective bets & raises.

I don't know exactly what you mean here but the value you need will be the sum of all the columns added together as above.
Steve.Dub wrote:That number divided by cnt_f_saw gives the average of sum of flop bets & raises.

You might want to use a custom column that excludes preflop all-ins that went to a flop and also consider whether you want your average to be calculated from all other flops seen (including hands where no aggressive action was taken) or only from hands where an aggressive action was taken.
Flag_Hippo
Moderator
 
Posts: 15186
Joined: Tue Jan 31, 2012 7:50 am

Re: Custom Stat Effective BB Bet or Raised

Postby Steve.Dub » Mon Dec 24, 2018 1:07 pm

Steve.Dub wrote:When action doesn't include a call, use only the total amount wagered. Condition NOT LIKE '%C%'.

When action is bet/call, the amount bet or raised is tourney_hand_player_statistics.amt_bet_f - tourney_hand_player_statistics.amt_f_2bet_facing. Condition = 'BC'.

When action is raise/call, the amount bet or raised is tourney_hand_player_statistics.amt_bet_f - tourney_hand_player_statistics.amt_f_3bet_facing. Condition = 'RC'.


Flag_Hippo wrote:That's fine if you are playing heads up games or specify that the pot was heads up on the flop however if you want to include multiway pots your statistic is going to get alot more complex. For example if the action is 'BC' in a multiway pot then the call could have been versus a 3Bet+.


I'm going to limit this to HU on the flop to make it viable. Is this correct?

Code: Select all
cnt_saw_flop = 2


Steve.Dub wrote:That number divided by cnt_f_saw gives the average of sum of flop bets & raises.

Flag_Hippo wrote:You might want to use a custom column that excludes preflop all-ins that went to a flop and also consider whether you want your average to be calculated from all other flops seen (including hands where no aggressive action was taken) or only from hands where an aggressive action was taken.


Same question, do I code this

Code: Select all
enum_allin != 'P'


Thanks again.
Steve.Dub
 
Posts: 8
Joined: Fri Feb 07, 2014 1:27 pm

Re: Custom Stat Effective BB Bet or Raised

Postby Steve.Dub » Mon Dec 24, 2018 1:33 pm

Also, do I still need

Code: Select all
 tourney_hand_player_statistics.flg_f_saw


when I have

Code: Select all
live_tourney_table.cnt_saw_flop = 2
Steve.Dub
 
Posts: 8
Joined: Fri Feb 07, 2014 1:27 pm

Re: Custom Stat Effective BB Bet or Raised

Postby Flag_Hippo » Wed Dec 26, 2018 10:04 am

Steve.Dub wrote:I'm going to limit this to HU on the flop to make it viable. Is this correct?

Code: Select all
cnt_saw_flop = 2

Steve.Dub wrote:Also, do I still need

Code: Select all
 tourney_hand_player_statistics.flg_f_saw

when I have

Code: Select all
live_tourney_table.cnt_saw_flop = 2

You shouldn't be using anything from the live statistics table for this but you can use:

Code: Select all
tourney_hand_summary.cnt_players_f = 2

Generally you should also use tourney_hand_player_statistics.flg_f_saw to specify that the player for whom the stat is written for is one of the players that saw the flop but if you are specifying their flop actions elsewhere you don't have to use it.

Steve.Dub wrote:Same question, do I code this

Code: Select all
enum_allin != 'P'

That's fine.
Flag_Hippo
Moderator
 
Posts: 15186
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 27 guests

cron