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

Can't get hor lines 20&80 on indicator

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

    Can't get hor lines 20&80 on indicator

    Hello,
    i can't get the horizontal lines of the 20 and 80 on the indicator as you can see on the attached picture. Above the MFI with the right ones, below the problem on the BolligerPercB.

    Code:
    protected override void Initialize()
            {
                Add(new Plot(Color.DarkBlue, "BpB"));
                Add(new Line(Color.Red, 20, "Lower"));
                Add(new Line(Color.Green, 80, "Upper"));
            }
    Attached Files

    #2
    I would try 0.2 and 0.8 for the Bollinger % one, looks like it's not scaling to 0 - 100 range...
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Thanks Bertrand,
      scaling 0.2 and 0.8 works.
      But how can i scaling 0-100 ??

      Comment


        #4
        You would need to change the indicator outputted value for the plot for example by multiplying it with a custom factor...
        BertrandNinjaTrader Customer Service

        Comment


          #5
          If you take a look at the RSI source for ex. , there is nothing other to do and the hor-line values are set to 20 & 80.

          Comment


            #6
            Correct, because the RSI per se would be range bound from 0-100 by it's normal calculations.
            BertrandNinjaTrader Customer Service

            Comment


              #7
              Mine would be range bound 0-100 also.

              and others on the guide.

              Comment


                #8
                Originally posted by mate41 View Post
                Sorry I don't follow your last reply - the Bollinger % B custom indicator would not scale to 0-100 per default, hence you would either need to

                a) work with adjusted overbought / oversold levels i.e. 0.2 and 0.8

                b) change the output value from the custom indicator to fit your scaling needs
                BertrandNinjaTrader Customer Service

                Comment


                  #9
                  Thanks Bertrand,
                  i had to multiply the %B by 100. ( see your previous post )
                  The scale follows the indicator (%B) automatically.

                  Comment


                    #10
                    Glad to hear that mate41.
                    BertrandNinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by giulyko00, Today, 12:03 PM
                    0 responses
                    4 views
                    0 likes
                    Last Post giulyko00  
                    Started by AttiM, 02-14-2024, 05:20 PM
                    12 responses
                    213 views
                    0 likes
                    Last Post DrakeiJosh  
                    Started by cre8able, 02-11-2023, 05:43 PM
                    3 responses
                    238 views
                    0 likes
                    Last Post rhubear
                    by rhubear
                     
                    Started by frslvr, 04-11-2024, 07:26 AM
                    8 responses
                    117 views
                    1 like
                    Last Post NinjaTrader_BrandonH  
                    Started by stafe, 04-15-2024, 08:34 PM
                    10 responses
                    47 views
                    0 likes
                    Last Post stafe
                    by stafe
                     
                    Working...
                    X