AF

Forum for users that want to write their own custom queries against the PT database either via the Structured Query Language (SQL) or using the PT3 custom stats/reports interface.

Moderator: Moderators

AF

Postby pccarballo » Tue Sep 28, 2010 6:00 pm

Hi

So im looking at AF preflop. What I would like to know is if I can make AF when facing a steal.

Say we are playing HU Limit Holdem. I´m in the SB and I do raise, what I want to know is villians AF when he is facing a steal. I know I can reach this number with the filters but I would like to know if I can create a stat that shows this

Thanks!
pccarballo
 
Posts: 360
Joined: Wed Mar 05, 2008 6:33 pm
Location: Spain

Re: AF

Postby WhiteRider » Wed Sep 29, 2010 3:40 am

You can do this by duplicating the AF stat you're interested in and changing the copy to check for facing a steal.
Use "holdem_hand_player_statistics.flg_blind_def_opp" to check for facing a steal.

See the tutorial How To: Make a New Version of a Statistic.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: AF

Postby pccarballo » Wed Sep 29, 2010 7:26 am

Hi

I cannot see "holdem_hand_player_statistics.flg_blind_def_opp" so I´ve created it on "Holdem Cash Section" with this expression

"holdem_hand_player_statistics.flg_blind_b AND holdem_hand_player_statistics.flg_blind_def_opp"

Then the expression of PF AF is "if( cnt_p_call = 0, if( cnt_p_raise = 0, 'N/A', '{SYM:infinite}'), format_number(cnt_p_raise / cnt_p_call, 2, false, false))"

Please tell me if this is true

1. cnt_p_call = 0, if( cnt_p_raise = 0, 'N/A' This means that if I havent call preflop AND I havent raise preflop the PF AF should be N/A

2. {SYM:infinite} What does this means?

3. format_number(cnt_p_raise / cnt_p_call, 2, false, false) I believe this is the expression of PF (how agressive vs passive is a player) but I dont understand the ,2,false,false..

Thanks!
pccarballo
 
Posts: 360
Joined: Wed Mar 05, 2008 6:33 pm
Location: Spain

Re: AF

Postby WhiteRider » Wed Sep 29, 2010 7:55 am

Sorry - I didn't look at the existing stats. Due to the way the existing columns are built you'll need a bit more of a change.

The stat "Preflop AF" uses columns cnt_p_call and cnt_p_raise, but those columns do not specify anything about facing a steal, so you will need to build new columns to use in your new stat.

cnt_p_call_facing_steal =
sum(if[holdem_hand_player_statistics.flg_blind_def_opp, holdem_hand_player_statistics.cnt_p_call, 0])

cnt_p_raise_facing_steal =
sum(if[holdem_hand_player_statistics.flg_blind_def_opp, holdem_hand_player_statistics.cnt_p_raise, 0])

Then in your new stat use these columns in place of the existing ones.

{SYM:infinite} displays the infinity symbol - if you divide any value by zero you get infinity.

In format_number the first value is the number you want to format, the second is the number of decimal places. The other two are for colouring and thousands separators - if you click "insert" and choose format_number on the Functions tab it tells you what the parameters are.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: AF

Postby pccarballo » Wed Sep 29, 2010 10:44 am

Hi

I did end up with this expression

if( cnt_p_call_facing_steal = 0, if( cnt_p_raise_facing_steal = 0, 'N/A', '{SYM:infinite}'), format_number(cnt_p_raise_facing_steal/ cnt_p_call_facing_steal, 2, false, false))

But PT3 says is not valid..
pccarballo
 
Posts: 360
Joined: Wed Mar 05, 2008 6:33 pm
Location: Spain

Re: AF

Postby WhiteRider » Wed Sep 29, 2010 11:40 am

You just need a space before the /

if( cnt_p_call_facing_steal = 0, if( cnt_p_raise_facing_steal = 0, 'N/A', '{SYM:infinite}'), format_number(cnt_p_raise_facing_steal / cnt_p_call_facing_steal, 2, false, false))
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK


Return to Custom Stats, Reports, and SQL [Read Only]

Who is online

Users browsing this forum: No registered users and 0 guests