Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to avoid settings to show on input parameters

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

    How to avoid settings to show on input parameters

    Hello ,

    I have some lines on an indicator on the Initialize section like :
    Add(new Line(Color.DimGray, level1 * lvlx, "Level 1"));

    How can avoid its parameters ( color, level value, etc ) to show on input parameters ?
    pmaglio
    NinjaTrader Ecosystem Vendor - The Indicator Store

    #2
    Unfortunately you cannot.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      I found a way ;

      Just adding the line at the end of the Initialize Section :
      LinesConfigurable = false;
      pmaglio
      NinjaTrader Ecosystem Vendor - The Indicator Store

      Comment


        #4
        Ah. I see that is what you meant. Misunderstood. Thought you meant change the Add() syntaxing. Glad you got it resolved.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Now I have another problem :
          My indicator changes line value each time user change timeframe ; ie: on 5 min timeframe, lvlx=5 using this code on Initialize Section :
          if (Bars.Period.Id == PeriodType.Minute )
          { lvlx = Bars.Period.Value; Print( " " + lvlx +" "+level1*lvlx ); }
          Add(
          new Line(Color.DimGray, level1 * lvlx, "Level 1"));
          But when changing timeframe, the lines dont change ( levels are printed correct )....Any idea of what Im doing wrong ?
          pmaglio
          NinjaTrader Ecosystem Vendor - The Indicator Store

          Comment


            #6
            That is correct. You cannot have any such logic in Initialize(). After your script is selected in the indicator dialogue, no changes can be made except through the interface can be made.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              Is there any way to change lines positions from inside the code ?
              Something like Lines[0].Set( new value) ?
              pmaglio
              NinjaTrader Ecosystem Vendor - The Indicator Store

              Comment


                #8
                You can try Lines[0].Value = something, but this is not supported.
                Josh P.NinjaTrader Customer Service

                Comment


                  #9
                  That worked great !
                  Just adding Lines[n].Value = new value at OnBarUpdate() when CurrentBar==0 was enough..
                  Thanks Josh !
                  pmaglio
                  NinjaTrader Ecosystem Vendor - The Indicator Store

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                  0 responses
                  579 views
                  0 likes
                  Last Post Geovanny Suaza  
                  Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                  0 responses
                  334 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by Mindset, 02-09-2026, 11:44 AM
                  0 responses
                  101 views
                  0 likes
                  Last Post Mindset
                  by Mindset
                   
                  Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                  0 responses
                  554 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by RFrosty, 01-28-2026, 06:49 PM
                  0 responses
                  551 views
                  1 like
                  Last Post RFrosty
                  by RFrosty
                   
                  Working...
                  X