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 CaptainJack, 05-29-2026, 05:09 AM
    0 responses
    45 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 05-29-2026, 12:02 AM
    0 responses
    30 views
    0 likes
    Last Post CaptainJack  
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    99 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    177 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    170 views
    0 likes
    Last Post CarlTrading  
    Working...
    X