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

Adding Indicators

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

    Adding Indicators

    When you add indicators to a strategy to display is there anyway you can modify the indicators options like color and width?
    Josh P.NinjaTrader Customer Service

    #2
    Please check out the Initialize method of the SampleMACrossOver strategy.

    Comment


      #3
      ahh. Thanks. Is there a list to all the parameters available somewhere?
      Josh P.NinjaTrader Customer Service

      Comment


        #4
        Pen class is standard .NET. Please see e.g. here: http://msdn2.microsoft.com/en-us/lib...rs(VS.71).aspx

        Comment


          #5
          What I'm having problems with is trying to change the color of the upper and lower channels for my Regression Channel indicator.

          Code:
          RegressionChannel(60, 2).Lower.Pen.Color = Color.Purple;
          It doesn't like the Pen after Lower
          Josh P.NinjaTrader Customer Service

          Comment


            #6
            Please take again a look at the sample I provided. "Lower" is of type "DataSeries" and not of type "Plot".

            You need to go
            RegressionChannel(60, 2).Plots[2].Pen.Color = Color.Purple

            Comment


              #7
              Oh snap. Thanks. Sorry I'm just using trial and error to figure out the syntax at the moment.
              Josh P.NinjaTrader Customer Service

              Comment


                #8
                How do you set which Panel the indicator will show up on? I'm trying to get my volume to show up in panel 1.
                Josh P.NinjaTrader Customer Service

                Comment


                  #9
                  Please check out the Panel properties on the chart indicator dialog box.

                  Comment


                    #10
                    Sorry I meant to ask how to do it when I am calling the indicator from a strategy with Add().
                    Josh P.NinjaTrader Customer Service

                    Comment


                      #11
                      Hmm, have not yet tried if this works. You could try something like
                      Code:
                      SMA(Fast).Panel=2;
                      (see SampleMACrossOver strategy on how to set properties on indicators which are added by a strategy).

                      Comment


                        #12
                        It seems to kind of work.

                        .Panel=1 makes the indicator go to panel 2
                        .Panel=2 makes the indicator go to panel 3
                        but .Panel=0 doesn't make the indicator go to panel 1, instead it seems to just drop the indicator at a default panel.
                        Josh P.NinjaTrader Customer Service

                        Comment


                          #13
                          Right.
                          Panel is the internal 0-based representation.
                          PanelUI is the 1-based UI representation (like in the indicator dialog).

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by bmartz, 03-12-2024, 06:12 AM
                          4 responses
                          31 views
                          0 likes
                          Last Post bmartz
                          by bmartz
                           
                          Started by Aviram Y, Today, 05:29 AM
                          4 responses
                          12 views
                          0 likes
                          Last Post Aviram Y  
                          Started by algospoke, 04-17-2024, 06:40 PM
                          3 responses
                          28 views
                          0 likes
                          Last Post NinjaTrader_Jesse  
                          Started by gentlebenthebear, Today, 01:30 AM
                          1 response
                          8 views
                          0 likes
                          Last Post NinjaTrader_Jesse  
                          Started by cls71, Today, 04:45 AM
                          1 response
                          7 views
                          0 likes
                          Last Post NinjaTrader_ChelseaB  
                          Working...
                          X