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

Line Values as Parameters vs Lines in UI

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

    Line Values as Parameters vs Lines in UI

    Hello,
    Please see the attached snapshot of the Upper and Lower Parameters in the User Interface:

    http://screencast.com/t/2lxFIB1B1

    Now see the attached for the Lines section in the User Interface (purposely made different values than Upper/Lower):

    http://screencast.com/t/MtdAsZNr0wO

    My code is using Upper and Lower values for various tests. IE, If the line crosses the upper line at 80, draw an arrow. The value for Upper in the parameters is 80, and the Lines[0].Value is "Upper".

    I want to know if changing the line plot value using Upper or Lower must be changed in both of these sections of the user interface.
    Or, per another version, here is the user interface screenshot where they are listed together:
    http://screencast.com/t/Db3PEkgh

    When I make a change to the appearance on the chart, must I change both values for Upper 80 and for the Line plotted at 80?
    Last edited by zeller4; 04-10-2012, 04:46 PM.

    #2
    Hi zeller4,

    It depends how your lines are coded. Lines added with the new line in Initialize() are not meant to be dynamic, and changing the input will have no effect.

    If you want lines to change with an input, they need to be setup as horizontal lines with DrawHorizontalLine(), or by setting a plot value to the input, like is done with the built-in ConstantLines indicator.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Thanks Ryan,

      I'm testing the constant lines indicator with my code. What does this piece of code do? (couldn't find it in the help guide)

      Code:
      ChartOnly			= true;

      Comment


        #4
        Zeller,

        This is an unsupported property. What it does is make the indicator for visualization only meaning you cannot programmatically access its values in other scripts (indicator or strategy).
        Adam P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by WHICKED, Today, 12:56 PM
        1 response
        8 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by cre8able, Today, 01:16 PM
        0 responses
        2 views
        0 likes
        Last Post cre8able  
        Started by chbruno, 04-24-2024, 04:10 PM
        2 responses
        47 views
        0 likes
        Last Post chbruno
        by chbruno
         
        Started by WHICKED, Today, 12:45 PM
        1 response
        11 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by samish18, Today, 01:01 PM
        1 response
        6 views
        0 likes
        Last Post NinjaTrader_LuisH  
        Working...
        X