Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Value of property message

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

    Value of property message

    Hello,

    when running an indicator I get first time the attached error message in NT8. I never had this in NT7. I transcribed my indicator from NT7 to NT8.

    I´m sorry but I don´t understand this message Value of property "Period" of NinjaScript "MIN". It is referring to a script named "MIN"? And what means Value of property Period please?

    2 problems: a.) english is not my main language b.) I´m not a programmer (but happy what I could do with NT software and I never could have done with another one)

    Thank you!

    Tony

    Attached Files

    #2
    Hello Tony,

    Thanks for your post.

    The message is stating that the script you are loading is using the MIN indicator and passing a period of 0 when the indicator expects a period of 1 or greater.

    Period is the number of bars the indicator looks back and included in the calculation. Since we can find the minimum value of 0 bars, we will get an error.

    I would recommend adding a check when MIN is used to ensure that the value for the Period is always greater than 0. Please note, further changes may need to be made for the rest of the indicator to handle the situation when Period is 0. Syntax reference for MIN is included below.

    MIN - https://ninjatrader.com/support/help...inimum_min.htm

    Rough illustration:

    Code:
    int Period;
    
    if (Period > 0)
        MIN(Low, 20)[0];
    Please let me know if I can be of further assistance.
    JimNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by andrewtrades, Today, 04:57 PM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by chbruno, Today, 04:10 PM
    0 responses
    5 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
    7 views
    0 likes
    Last Post FAQtrader  
    Started by rocketman7, Today, 09:41 AM
    5 responses
    19 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Working...
    X