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.



    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by chbruno, Today, 04:10 PM
    0 responses
    3 views
    0 likes
    Last Post chbruno
    by chbruno
     
    Started by josh18955, 03-25-2023, 11:16 AM
    6 responses
    436 views
    0 likes
    Last Post Delerium  
    Started by FAQtrader, Today, 03:35 PM
    0 responses
    6 views
    0 likes
    Last Post FAQtrader  
    Started by rocketman7, Today, 09:41 AM
    5 responses
    19 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by frslvr, 04-11-2024, 07:26 AM
    9 responses
    127 views
    1 like
    Last Post caryc123  
    Working...
    X