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 judysamnt7, 03-13-2023, 09:11 AM
                    4 responses
                    57 views
                    0 likes
                    Last Post DynamicTest  
                    Started by ScottWalsh, Today, 06:52 PM
                    4 responses
                    35 views
                    0 likes
                    Last Post ScottWalsh  
                    Started by olisav57, Today, 07:39 PM
                    0 responses
                    7 views
                    0 likes
                    Last Post olisav57  
                    Started by trilliantrader, Today, 03:01 PM
                    2 responses
                    19 views
                    0 likes
                    Last Post helpwanted  
                    Started by cre8able, Today, 07:24 PM
                    0 responses
                    9 views
                    0 likes
                    Last Post cre8able  
                    Working...
                    X