Expressions
Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Expressions

  1. #1
    Senior Member
    Join Date
    Apr 2009
    Posts
    281

    Default Expressions

    Hi!

    I'd like to make a composite stat that combines average strength of 5 notes. But if there is no instance for one of those notes, the calculation won't happen and the stat wil be '-'. Probably because there is a division by zero problem if there is no instances.

    How do I make an expression that does the calculation even if there is no instances for some of the notes by leaving that note out of the calculation?

    The "NC.stat.instances > 0" still calculates the rest even if NC.stat.instances is = 0. So how do I really do the if/else statements?

  2. #2
    NoteCaddy sreticentv's Avatar
    Join Date
    Dec 2009
    Location
    No direction but to trust the final destination
    Posts
    6,481

    Default

    If there's a division by zero then the - is the correct thing to be shown. You want it to say what if there's no sample?
    If you are getting no result because one of several definitions has no sample but want it to keep calculating then you need to use the option "use 0 for not found NoteCaddy note" in the composite editor
    NoteCaddy Manual | Coaching Packs | Blog
    NoteCaddy experts: a.k.aAlso, Catalyst_Kh, Derders, karstenkloss, scoobediah (NoteCaddy Edge)

  3. #3
    Senior Member
    Join Date
    Apr 2009
    Posts
    281

    Default

    This is what I'm trying to do:

    (((NC."HU_ShovingRange19-21".Instances > 0) * NC."HU_ShovingRange19-21".PopulationAverageStrength) - NC."HU_ShovingRange19-21".AverageStrength) + (((NC."HU_ShovingRange17-19".Instances > 0) * NC."HU_ShovingRange17-19".PopulationAverageStrength) - NC."HU_ShovingRange17-19".AverageStrength) + ....

    If I have samples for all, it works. If I don't have a sample for one note, then it doesn't. I guess NC doesn't use 0 for .AverageStrength when you don't have a note?
    I'd like to skip the rest of the calculation for that note if there are no instances, if possible?
    Last edited by MassaTheChamp; 11-22-2014 at 05:25 AM.

  4. #4
    NoteCaddy sreticentv's Avatar
    Join Date
    Dec 2009
    Location
    No direction but to trust the final destination
    Posts
    6,481

    Default

    The way this is defined should do what you're expecting provided you are using the "use 0 for not found NoteCaddy note" option I described. Can you confirm you have that checked?
    NoteCaddy Manual | Coaching Packs | Blog
    NoteCaddy experts: a.k.aAlso, Catalyst_Kh, Derders, karstenkloss, scoobediah (NoteCaddy Edge)

  5. #5
    Senior Member
    Join Date
    Apr 2009
    Posts
    281

    Default

    Yes, I can comfirm that i have that option checked. I tested this for a player and I'm getting the 'Missing operator' error. Please see the attached picture. Also, the 11-13.AverageStrength is not recognized, the hand was J8s, but average strength is 0.0000
    Attachment 158333
    Last edited by MassaTheChamp; 11-24-2014 at 08:21 AM.

  6. #6
    NoteCaddy sreticentv's Avatar
    Join Date
    Dec 2009
    Location
    No direction but to trust the final destination
    Posts
    6,481

    Default

    Thank you for posting the screenshot. Indeed there's a problem with the .PopulationAverageStrength which is now fixed in the beta version http://forums.holdemmanager.com/note...-5-1-beta.html 2.5.1.3
    NoteCaddy Manual | Coaching Packs | Blog
    NoteCaddy experts: a.k.aAlso, Catalyst_Kh, Derders, karstenkloss, scoobediah (NoteCaddy Edge)

  7. #7
    Senior Member
    Join Date
    Apr 2009
    Posts
    281

    Default

    Wow, great, thanks, it works now

    If you don't mind, I'd like to ask you 2 more questions:

    Sometimes I get the same note for 7-9bb range and 9-11bb range. This happens when the size is exactly 9bb. What is the most efficient way to make a definition so that every note gets written only once? 7-8.99bb and 9-10.99bb?

    Is there a way to make an action sequence happen either (not and) OTF, OTT, OTR, without creating 3 separate definitions?
    Last edited by MassaTheChamp; 11-25-2014 at 03:21 PM.

  8. #8
    NoteCaddy sreticentv's Avatar
    Join Date
    Dec 2009
    Location
    No direction but to trust the final destination
    Posts
    6,481

    Default

    8.99, 9.01 - up to you

    Is there a way to make an action sequence happen either (not and) OTF, OTT, OTR, without creating 3 separate definitions?
    Sorry, no
    NoteCaddy Manual | Coaching Packs | Blog
    NoteCaddy experts: a.k.aAlso, Catalyst_Kh, Derders, karstenkloss, scoobediah (NoteCaddy Edge)

  9. #9
    Senior Member
    Join Date
    Apr 2009
    Posts
    281

    Default

    Hello again,

    I have made another composite definition (with a looong expression). When I test or when I analyze this definition, everything works as expected. But it doesn't show on the HUD or in the notes popup. What can I do?

    There is another problem I have with composites. Very often when I edit the definition, it's priority goes up * 100. This doesn't even bother me, because the other composite definition worked as expected. But maybe it has something to do with this one not showing up on the HUD.
    Last edited by MassaTheChamp; 12-02-2014 at 02:07 PM.

  10. #10
    NoteCaddy sreticentv's Avatar
    Join Date
    Dec 2009
    Location
    No direction but to trust the final destination
    Posts
    6,481

    Default

    Are you using the NC 2.5.1.3 version? That has a fix for a similar issue http://forums.holdemmanager.com/note...-5-1-beta.html
    NoteCaddy Manual | Coaching Packs | Blog
    NoteCaddy experts: a.k.aAlso, Catalyst_Kh, Derders, karstenkloss, scoobediah (NoteCaddy Edge)

Similar Threads

  1. if statements in composite expressions
    By oerman in forum NoteCaddy
    Replies: 1
    Last Post: 01-02-2013, 03:30 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •