My custom stat doesn't appear when I try to put it into HUD

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

Moderators: WhiteRider, kraada, Flag_Hippo, morny, Moderators

My custom stat doesn't appear when I try to put it into HUD

Postby Uhlvar » Tue Dec 23, 2014 2:37 pm

Hello!

I tried to make a custom stat "Number of times a player 3bet to a size smaller than 2.25 x the open raise Preflop."

The first thing I did was to create a new column that is called "cnt_p_min3bet_vs_btn_open" and i put the following expression inside:

Code: Select all
sum(if[val_p_3bet_size_x = 1 OR val_p_3bet_size_x = 2, 1, 0])


Here is a picture of how it looks:
Image

The expression validate so I go forward to making my stat "Min3b PreFlop" with the following expression:

Code: Select all
(cnt_p_min3bet_vs_btn_open / cnt_p_3bet_vs_btn_open) * 100


Here is a picture of how it looks:

Image


This statistic validate as well!

Everything seemed fine but when I go to "Hud Profiles" and try to add the statistic to my HUD I can't find it there so I figure there is some problem.
This is my first stat that I ever created so the possibility that there is some beginner mistake is high :D Maybe someone here can point it out?
Uhlvar
 
Posts: 18
Joined: Fri Oct 03, 2014 5:54 am

Re: My custom stat doesn't appear when I try to put it into

Postby kraada » Tue Dec 23, 2014 3:05 pm

I'm surprised that the column validated in the first place - it isn't referencing a valid part of the database as there is no "val_p_3bet_size_x" in our database. The way the data is stored actually makes this particular stat quite a bit more complicated than that. It ends up looking like this:

sum(if[cash_hand_player_statistics.flg_p_3bet AND (((cash_hand_player_statistics.flg_p_limp or cash_hand_player_statistics.flg_blind_b or (cash_hand_player_statistics.flg_blind_db and lookup_actions_p.action like 'X%')) AND (cash_hand_player_statistics.amt_p_raise_made / (cash_hand_player_statistics.amt_p_2bet_facing + cash_limit.amt_bb)) = 2.25) OR (cash_hand_player_statistics.flg_blind_s AND NOT(cash_hand_player_statistics.flg_p_limp) AND (cash_hand_player_statistics.amt_p_raise_made / (cash_hand_player_statistics.amt_p_2bet_facing + cash_limit.amt_sb)) = 2.25) OR (NOT(cash_hand_player_statistics.flg_p_limp) and NOT(cash_hand_player_statistics.flg_blind_b) and NOT(cash_hand_player_statistics.flg_blind_s) AND (cash_hand_player_statistics.amt_p_raise_made / cash_hand_player_statistics.amt_p_2bet_facing) = 2.25)), 1, 0])
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: My custom stat doesn't appear when I try to put it into

Postby Uhlvar » Tue Dec 23, 2014 3:18 pm

Thanks a lot for the help!

Can you direct me to a place where I can learn more about what is in the database etc? I have experience with databases from university where I have read a course in SQL. I tried to find some information inside Pokertracker where I found definitions of the columns and other stats but I couldn't find much about the database.
Uhlvar
 
Posts: 18
Joined: Fri Oct 03, 2014 5:54 am

Re: My custom stat doesn't appear when I try to put it into

Postby Uhlvar » Tue Dec 23, 2014 3:27 pm

For example the stat "cash_hand_player_statistics.flg_p_limp" is boolean so I would guess it is true when player limp? Is this correct?
Uhlvar
 
Posts: 18
Joined: Fri Oct 03, 2014 5:54 am

Re: My custom stat doesn't appear when I try to put it into

Postby kraada » Tue Dec 23, 2014 4:55 pm

Yes, that's how flg_p_limp works. You can find our schema in the schema.postgres.sql file in C:\Program Files (x86)\PokerTracker 4\Data\Schemas. Most things are named in a fairly straightforward fashion (like flg_p_limp) - _f_ is always flop, _t_ for turn, _r_ for river. If you have any specific questions, just ask.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: My custom stat doesn't appear when I try to put it into

Postby Uhlvar » Tue Dec 23, 2014 5:59 pm

Okay that is very useful! I also found the PT3 database schema.

I have some questions:

What is the / ? I mean in "cash_hand_player_statistics.amt_p_raise_made / (cash_hand_player_statistics.amt_p_2bet_facing + cash_limit.amt_bb)) = 2.25" how can you divide "bool" with "amt"?

What is the +? In "cash_hand_player_statistics.amt_p_2bet_facing + cash_limit.amt_sb)) = 2.25" How can we add "bool" and "amt" ?


Also I think that your code is for when the 3Bet is <2.25 big blinds. I'm looking for when the 3Bet is <2.25 x the open-raise.
Uhlvar
 
Posts: 18
Joined: Fri Oct 03, 2014 5:54 am

Re: My custom stat doesn't appear when I try to put it into

Postby WhiteRider » Wed Dec 24, 2014 4:49 am

They are the normal divide and addition symbols. In those expressions the database fields are not boolean, they are numeric values. In our naming convention if a value is a boolean the name starts with flg_. amt_ means "amount", and these fields are numeric.
WhiteRider
Moderator
 
Posts: 54017
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: My custom stat doesn't appear when I try to put it into

Postby Uhlvar » Mon Dec 29, 2014 3:20 am

Thanks for fast answers!

The code that you gave me worked I just had to change the "= 2.25" with "<2.25". I tried to make my own code and came up with this. This worked on my test example but maybe there is some other error that I have not tested yet, if there is maybe someone here can point it out.

sum( if[ (cash_hand_player_statistics.position=8 AND cash_hand_player_statistics.flg_blind_def_opp AND lookup_actions_p.action LIKE 'R%' AND cash_hand_player_statistics.val_p_raise_aggressor_pos=9) AND
(cash_hand_player_statistics.amt_p_raise_made / (cash_hand_player_statistics.amt_p_2bet_facing + cash_limit.amt_bb)) < 2.25 , 1 , 0 ] )
Uhlvar
 
Posts: 18
Joined: Fri Oct 03, 2014 5:54 am

Re: My custom stat doesn't appear when I try to put it into

Postby kraada » Mon Dec 29, 2014 8:55 am

Nothing obvious jumps out at me. Is it working fine for you now?
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: My custom stat doesn't appear when I try to put it into

Postby Uhlvar » Mon Dec 29, 2014 8:58 am

It works fine but I was wondering why the code you made is so complicated? Does it run faster or maybe I'm missing some strange case that you take into account?
Uhlvar
 
Posts: 18
Joined: Fri Oct 03, 2014 5:54 am

Next

Return to Custom Stats, Reports and HUD Profiles

Who is online

Users browsing this forum: Floris1988 and 24 guests

cron