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 rocketman7, Today, 01:00 AM
    0 responses
    1 view
    0 likes
    Last Post rocketman7  
    Started by wzgy0920, 04-20-2024, 06:09 PM
    2 responses
    27 views
    0 likes
    Last Post wzgy0920  
    Started by wzgy0920, 02-22-2024, 01:11 AM
    5 responses
    32 views
    0 likes
    Last Post wzgy0920  
    Started by wzgy0920, 04-23-2024, 09:53 PM
    2 responses
    74 views
    0 likes
    Last Post wzgy0920  
    Started by Kensonprib, 04-28-2021, 10:11 AM
    5 responses
    193 views
    0 likes
    Last Post Hasadafa  
    Working...
    X