• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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.

    http://www.ninjatrader-support.com/H...ticalLine.html

    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 NinjaCustomer, Today, 09:37 AM
      0 responses
      4 views
      0 likes
      Last Post NinjaCustomer  
      Started by stalt, Today, 07:52 AM
      5 responses
      14 views
      0 likes
      Last Post NinjaTrader_PatrickG  
      Started by im197, 07-30-2019, 12:29 PM
      2 responses
      10 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by 7robert, Today, 08:20 AM
      1 response
      8 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by GARZONJ, Today, 08:06 AM
      1 response
      6 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Working...
      X