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

Dotted Lines for Off-Chart Indicator

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

    Dotted Lines for Off-Chart Indicator

    Hello -

    Does NT 8 support creating a dotted-line indicator? Dots for each bar-value joined by a line?


    Thanks,
    Mark

    #2
    Hello mmeninger,

    Thank you for writing to the support team.

    I am reviewing your inquiry and will be back with a reply shortly.

    I look forward to assisting further.
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Hello mmeninger,

      Thank you for the post.

      To make a dotted line, you will add a new Plot to your indicator. There is a corresponding Value[] array that you will fill with data. The Plot will reflect upon the chart whatever data you add to the Value[] array.

      Use AddPlot() to add a new plot object to your chart:



      Code:
      protected override void OnStateChange()
      {
        if (State == State.SetDefaults)
        {
          Name = "Example Indicator";
          ...
          // Adds a gold dotted line style plot
         AddPlot(new Stroke(Brushes.Goldenrod, DashStyleHelper.Dot, 2), PlotStyle.Line, "myPlot");
        }
      }
      
      ...
      
      protected override void OnBarUpdate()
      {
      	Value[0] = Close[0];
      }
      This example will draw a dotted line between the Close[] values of the bar.

      Please let me know if I may be of any further assistance.
      Chris L.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by alifarahani, Today, 09:40 AM
      6 responses
      30 views
      0 likes
      Last Post alifarahani  
      Started by Waxavi, Today, 02:10 AM
      1 response
      17 views
      0 likes
      Last Post NinjaTrader_LuisH  
      Started by Kaledus, Today, 01:29 PM
      5 responses
      13 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by Waxavi, Today, 02:00 AM
      1 response
      12 views
      0 likes
      Last Post NinjaTrader_LuisH  
      Started by gentlebenthebear, Today, 01:30 AM
      3 responses
      17 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Working...
      X