Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Plotting order of indicators NT8.0 (not NT8.1)

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

    Plotting order of indicators NT8.0 (not NT8.1)

    Hello!!

    Can I ask you how NinjaTrader (or NinjaScript) controls the plotting order of indicators? How does it determine which indicator drawn first (means very back) which one goes last (means very front) when plotting multiple indicators in a single panel? I don't think it's done randomly everytime.

    Please note it's not inside one indicator (.cs file) such as AddLine(Brushes.DarkGray, 0, "Zero Line"), AddPlot(Brushes.Green, "A line") and AddPlot(Brushes.Red, "B line"), many individual indicators involve.


    I am plotting indicators like TimeLines (vertical lines every n minutes/hours), Histogram or Bar type indicators which I want them to stay at the very back not to disconnect the continuous lines like moving averages by passing over them. I know it's just a cosmetic issue, but to improve visibility of other line type indicators and candlesticks as well, I wanted to know if there are any solutions which can be done by user side.

    Sample is attached. On the price panel, vertical and horizontal line indicators* are runing over the candlesticks and moving averages and on the indicator panel at very bottom, bar type indicator is being plotted over the line type indicator so that it causes decreasing visibility of line type indicator.

    *..These are not standard grid lines that come with NT8.0, but have been created by the end user and both widths are already minimum which is 1 so I can't make it thinner anymore.
    Attached Files

    #2
    Hello Super Bardock,

    Indicators are layered in the order they are loaded, the first loaded are on the bottom and the last loaded are on the top.

    Plots within an indicator are layered in the order AddPlot() is called. The first are layered on the bottom the last are layered on the top.

    You can set the ZOrder of indicators if you want to control the layering.
    Join the official NinjaScript Developer Community for comprehensive resources, documentation, and community support. Build custom indicators and automated strategies for the NinjaTrader platforms with our extensive guides and APIs.

    Comment


      #3
      Hi ChelseaB,

      Thank you for your reply.

      Yes! This is what I was looking for.

      Thank you so very much!

      Comment


        #4
        Originally posted by NinjaTrader_ChelseaB View Post
        Indicators are layered in the order they are loaded, the first loaded are on the bottom and the last loaded are on the top.

        This means you can set the ZOrder by the order in
        which you add your indicators to the chart.

        I've found that you can also adjust the ZOrder via the
        Indicators dialog after you've added them.

        How so?
        Look at the indicators added in the Indicators dialog.

        [Right click in chart, select 'Indicators...' from the
        context menu. In the Indicators dialog that pops
        up, it'll show all configured indicators in the lower
        left panel.]

        See those little word 'buttons' along the bottom right?
        It will show 4 buttons -- add remove up down.

        If you adjust the relative ordering using the up/down
        buttons, you'll affect the ZOrder of the indicators.

        Last edited by bltdavid; 04-18-2025, 08:07 AM.

        Comment


          #5
          Do you mean if I want "A" indicator to be plotted very first (means very back), "A" needs to go up to the very top of the list and if I want "B" to be plotted last (means very front), "B" needs to go down to the very bottom of the list?

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by abelsheila, 05-14-2025, 07:38 PM
          2 responses
          30 views
          0 likes
          Last Post hglover945  
          Started by nailz420, 05-14-2025, 09:14 AM
          1 response
          57 views
          0 likes
          Last Post NinjaTrader_ChristopherJ  
          Started by NinjaTrader_Brett, 05-12-2025, 03:19 PM
          0 responses
          326 views
          1 like
          Last Post NinjaTrader_Brett  
          Started by domjabs, 05-12-2025, 01:55 PM
          2 responses
          62 views
          0 likes
          Last Post domjabs
          by domjabs
           
          Started by Morning Cup Of Trades, 05-12-2025, 11:50 AM
          1 response
          81 views
          0 likes
          Last Post NinjaTrader_ChristopherJ  
          Working...
          X