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

Using My New Indicator

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

    Using My New Indicator

    I have edited an existing indicator using the NinjaScript editor,
    Then saved it.
    I am wondering how I now incorporate it into my chart?
    If I have a chart open, and click on Indicators it doesn't appear to be there?

    #2
    You will need to compile your indicator before it will show up on the list. Go back to the NinjaScript Editor and hit F5 to compile.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Many Thanks
      Also I am a novice programmer, If I want to colour format a stochastic that has both K & D, do I only need to put the formatting code;

      Add(new Plot(Color.LimeGreen, PlotStyle.Line, "Rising"));
      Add(new Plot(Color.Red, PlotStyle.Line, "Falling"));
      Add(new Plot(Color.Yellow, PlotStyle.Line, "Neutral"));

      in once or do I need to put it in for each of the variables?

      If I do need to put it in for each variable to I reference it as "RisingD" or "Rising","D" ?

      Also if I wanted to have the indicator as a line and bars I just need to add a new plot?

      Many thanks in advance

      Comment


        #4
        Also,
        Once I compile it, place it on a chart am I still able to edit it?
        I assume that it will continue to look the same on the chart until I compile it again?

        Comment


          #5
          If you want K and D to be both color coded you will need a total of 6 plots. Please see the reference sample section for Multi-Colored Plots. You need 3 plots for K and 3 for D.

          You can edit your indicator whenever you like, but to have it reflected on the chart you may need to remove the indicator and readd it on.
          Josh P.NinjaTrader Customer Service

          Comment


            #6
            I have cut and pasted and ammended the code from your sample.

            The error messages relating to ; and } I have tried placing them in the required rows and that doesn't seem to make any difference. I am also unsure why the code would expect a statement.

            There mst be something that I am doing terribly wrong are you able to help @ all?

            Just looking at it the errors occur in an area "the properties" down the bottom that I haven't touched?

            Comment


              #7
              Expand the reference sample's Properties region. You will see there have been several lines of code added. You need to make 6 plots in there to correspond with the 6 in the Initialize().

              If all this does not make sense you could try a NinjaScript Consultant to produce what you want: http://www.ninjatrader.com/webnew/pa...injaScript.htm
              Josh P.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by andrewtrades, Today, 04:57 PM
              1 response
              8 views
              0 likes
              Last Post NinjaTrader_Manfred  
              Started by chbruno, Today, 04:10 PM
              0 responses
              6 views
              0 likes
              Last Post chbruno
              by chbruno
               
              Started by josh18955, 03-25-2023, 11:16 AM
              6 responses
              436 views
              0 likes
              Last Post Delerium  
              Started by FAQtrader, Today, 03:35 PM
              0 responses
              7 views
              0 likes
              Last Post FAQtrader  
              Started by rocketman7, Today, 09:41 AM
              5 responses
              19 views
              0 likes
              Last Post NinjaTrader_Jesse  
              Working...
              X