Page 1 of 1

fold to 3bet custom stat

PostPosted: Sun Nov 17, 2013 4:08 pm
by B Champman
hi guys,

Im trying to create my own custom stat and wondering if you can show me where I've gone wrong. Im trying to make a stat that shows fold to 3bet when villain is in BTN (and subsequently every other position once I figure out how to do it)

the stat validates and is in my stats list, but when I put it in the hud/popup the value is always 0% (there will be varying numbers of valid time, but it iwll always be 0, eg: 0/15 or 0/90 when this is clearly not true)


heres my value expression

(cnt_p_3bet_def_action_fold_when_open_raised_btn / cnt_p_3bet_def_opp_when_open_raised) * 100


heres the expression in the column that makes the stat only count when villain is in the BTN

sum(if[char_length(cash_hand_summary.str_aggressors_p) >= 3 and cash_hand_player_statistics.enum_p_3bet_action='F' AND cash_hand_player_statistics.flg_p_first_raise AND substring(cash_hand_summary.str_aggressors_p from 3 for 1)::int = cash_hand_player_statistics.position, 0, 0])


I have never made a stat and may be completely missing a step to creating a custom stat so please bear with me here. any help is greatly appreciated!

Re: fold to 3bet custom stat

PostPosted: Mon Nov 18, 2013 9:52 am
by kraada
You want to replace:
substring(cash_hand_summary.str_aggressors_p from 3 for 1)::int = cash_hand_player_statistics.position
with
substring(cash_hand_summary.str_aggressors_p from 3 for 1)::int = 0

You want the 3bet to come from the button which is position 0. cash_hand_player_statistics.position is the position of the player whose eyes we are looking through.

Re: fold to 3bet custom stat

PostPosted: Tue Nov 19, 2013 12:39 pm
by B Champman
perfect thank you

Re: fold to 3bet custom stat

PostPosted: Tue Nov 19, 2013 6:05 pm
by B Champman
when I change it to what you stated, I get invalid SQL statement. how do I fix that?

Re: fold to 3bet custom stat

PostPosted: Wed Nov 20, 2013 3:48 am
by WhiteRider
Please paste your full expression so that we can see where the error is. If what you had before validated, then kraada's change should certainly work.

I notice that you have "0,0" at the end, though - to count the instances that needs to be "1,0". (That won't stop it validating, though.)

Re: fold to 3bet custom stat

PostPosted: Wed Nov 20, 2013 11:26 am
by B Champman
This is the full expression

um(if[char_length(cash_hand_summary.str_aggressors_p) >= 3 and cash_hand_player_statistics.enum_p_3bet_action='F' AND cash_hand_player_statistics.flg_p_first_raise AND substring(cash_hand_summary.str_aggressors_p from 3 for 1)::int = 0

Re: fold to 3bet custom stat

PostPosted: Wed Nov 20, 2013 12:01 pm
by kraada
It should be:
sum(if[char_length(cash_hand_summary.str_aggressors_p) >= 3 and cash_hand_player_statistics.enum_p_3bet_action='F' AND cash_hand_player_statistics.flg_p_first_raise AND substring(cash_hand_summary.str_aggressors_p from 3 for 1)::int = 0, 1, 0])

Re: fold to 3bet custom stat

PostPosted: Wed Nov 20, 2013 5:53 pm
by B Champman
alright thank you, just to make sure, what number/s need to be changed for position? that was for BTN which is 0 so for CO would it be 1,1,1]) ?? what do the 3 values mean exactly

Re: fold to 3bet custom stat

PostPosted: Wed Nov 20, 2013 6:01 pm
by kraada
For CO it's:

sum(if[char_length(cash_hand_summary.str_aggressors_p) >= 3 and cash_hand_player_statistics.enum_p_3bet_action='F' AND cash_hand_player_statistics.flg_p_first_raise AND substring(cash_hand_summary.str_aggressors_p from 3 for 1)::int = 1, 1, 0])

The substring is the position of the 3bettor, that's what you change. The "1, 0" piece is related to the if[] statement. If the entire thing from [ to , is true, it adds 1, if it is false, it adds 0.

Re: fold to 3bet custom stat

PostPosted: Thu Nov 21, 2013 1:58 am
by B Champman
awesome ty, those stats are working!