Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Easy Properties Question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Easy Properties Question

    I have 3 properties:

    double p1
    double p2
    double p3

    and would like to ensure

    p1 >= 0, p2 >= 0 and p3 >=0

    and

    p2 > p1 and p3 > p2

    any help appreciated.

    #2
    Hello,

    With NinjaTrader 8 you have two options for input checking.

    1) To use the Range attribute to make sure you are inside of a pre-defined range detailed here: http://ninjatrader.com/support/helpG...eattribute.htm

    However this will not do exactly what you are asking so I will detail the next option.

    2) In OnStateChanged, if State.Configure then check the conditions of your properties and 'reset' any properties as needed. You can also add a 'Log' message to the user to let them know of the changed property. You check in state.configure since this is only called once as the indicator is added to the chart when all properties have been configured by the user and the user clicked OK/Apply.



    BrettNinjaTrader Product Management

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    662 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    376 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    110 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    575 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    580 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X