Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Help Painting in Bar

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

    Help Painting in Bar

    Hey Guys, I'm new to Ninja so please excuse me if this is a newbie question. I've switched over from TradeStation where I was used to easylanguage so I'm just getting aquainted with ninjascripts.

    Please see the attached photo for what I am looking for interms of coding help.

    As you can see I've managed to get my indicator to plot the high and the low of the calculated formula. The white dot is the high and the red is the low. But what I'd like to see is a line (a bar) that is similar to price's OHLC bar, one that's pained in solid in the entire range. I'd also like to add a Close to this bar if possible.
    Is this possible in Ninja?
    Here's what I've got to plot the High:
    Add(new Plot(Color.FromKnownColor(KnownColor.White), PlotStyle.Dot, "Hi"));

    And then Hi.set to finish it off.

    Any help would be appreciated.
    Thanks
    JJ
    Attached Files

    #2
    Off the top of my head, you likely will want to use the DrawVerticalLine() method.



    You could play around with other drawing methods to try and get some marker for the close price. If you plan on have individual lines for each bar, keep in mind that managing many draw objects can become performance intensive. You may consider limiting how many lines are drawn such as --> Only draw lines on the last 200 bars etc...
    RayNinjaTrader Customer Service

    Comment


      #3
      Thanks for the pointer.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      571 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      330 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      548 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      549 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X