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 DayTradingDEMON, Today, 09:28 AM
      3 responses
      19 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by Stanfillirenfro, Today, 07:23 AM
      9 responses
      23 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by George21, Today, 10:07 AM
      0 responses
      8 views
      0 likes
      Last Post George21  
      Started by navyguy06, Today, 09:28 AM
      1 response
      7 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by cmtjoancolmenero, Yesterday, 03:58 PM
      8 responses
      33 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Working...
      X