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

AddChartIndicator: Help with visuals

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

    AddChartIndicator: Help with visuals

    I have Double Stochastics being added into my strategy via this line in which "DstochsPeriod" is a variable I can input through the strategy to change the period of Double Stochastics.

    AddChartIndicator(DoubleStochastics(Close, DstochsPeriod));

    I also have two variables for the upper line and lower line of Double Stochastics defined as

    UpperDstochs & LowerDstochs

    How can I go about getting the added indicator to show the lines according to the variables I have input?

    Also, by default the Double Stochastics line is set to a thickness of 1 by default and I'm wondering how I can set it to 2 within the strategy?

    #2
    Hello Rogue_Two,

    Thanks for your post.

    You would use the ChartIndicators collection to modify the particulars of the plots or lines of the added indicator. Reference: https://ninjatrader.com/support/help...indicators.htm

    I've added an example from your description and showed a couple of other options.
    Attached Files
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Awesome! Thank you Paul!

      What would be the field to change the actual Double Stochastics red line width?

      Comment


        #4
        Hello Rogue_Two,

        Thanks for your reply.

        To change the Plot you would use something like:

        ChartIndicators[0].Plots[0].Width = 4;
        Paul H.NinjaTrader Customer Service

        Comment


          #5
          Awesome! Thank you again!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by wzgy0920, 04-20-2024, 06:09 PM
          2 responses
          26 views
          0 likes
          Last Post wzgy0920  
          Started by wzgy0920, 02-22-2024, 01:11 AM
          5 responses
          32 views
          0 likes
          Last Post wzgy0920  
          Started by wzgy0920, Yesterday, 09:53 PM
          2 responses
          49 views
          0 likes
          Last Post wzgy0920  
          Started by Kensonprib, 04-28-2021, 10:11 AM
          5 responses
          191 views
          0 likes
          Last Post Hasadafa  
          Started by GussJ, 03-04-2020, 03:11 PM
          11 responses
          3,230 views
          0 likes
          Last Post xiinteractive  
          Working...
          X