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

Changing Z-Order when object not selectable

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

    Changing Z-Order when object not selectable

    Hello, wondering if anyone can help here. I have 2 indicators battling for Z-Order position but neither can be selected by clicking and shift-scrolling. Pic below.

    One of these is KISS Order Flow and the other is SupDemZones. I have tried to just remove them and add them back in the order I want as well to no avail. As you can see the Supply/Demand zones are covering up the bar profile but I was able to bring the actual bar to the front in the normal way.

    KISS is not open source but SupDemZones is so looking through the code I see:

    indicatorVersion = "1.2 | Dec. 2016";
    }
    else if(State == State.Configure)
    {
    if(useMTF)
    {
    barIndex = 1;
    AddDataSeries((BarsPeriodType)barType, barPeriod);
    }

    ZOrder = ChartBars.ZOrder - 7;

    if(!initOne)
    {
    menuSepa = new Separator();
    menuItem = new MenuItem { Header = "Zones" };
    menuItemActive = new MenuItem { Header = (hideActiveZones) ? "Show Active Zones" : "Hide Active Zones" };
    menuItemBroken = new MenuItem { Header = (hideBrokenZones) ? "Show Broken Zones" : "Hide Broken Zones" };




    I have tried playing with that ZOrder setting but no luck. Any other ideas?

    Thanks!​





    Click image for larger version

Name:	image.png
Views:	132
Size:	17.0 KB
ID:	1241234


    #2
    Hello, thanks for writing in. The highest z order will be the top most object/series/plot on the chart. The only way to change this is through the indicator ZOrder = ChartBars.ZOrder - 7; is setting the Zorder for this indicator 7 layers below the chart bars on start up. Set this up to place it further up on the z axis. See also SetZOrder()

    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Thank you for the response Chris. Unfortunately after setting that parameter to 20, it still did not send it to the back. Not sure where to go next.

      Comment


        #4
        Hi, thanks for the follow up. The help guide says not to set the ZOrder property directly. Does it work if you comment out this line: ZOrder = ChartBars.ZOrder - 7; and use SetZOrder(ChartBars.ZOrder +1);
        Chris L.NinjaTrader Customer Service

        Comment


          #5
          Yes it does! Thanks! I set the number to 20 and it moved to the back..

          Thanks again for the help

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by giulyko00, Today, 12:03 PM
          1 response
          5 views
          0 likes
          Last Post NinjaTrader_BrandonH  
          Started by f.saeidi, Today, 12:14 PM
          1 response
          4 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by aprilfool, 12-03-2022, 03:01 PM
          2 responses
          327 views
          0 likes
          Last Post BottomShark77  
          Started by AnnBarnes, Today, 12:17 PM
          1 response
          2 views
          0 likes
          Last Post NinjaTrader_Zachary  
          Started by Lopat, 03-05-2023, 01:19 PM
          4 responses
          169 views
          0 likes
          Last Post Sam2515
          by Sam2515
           
          Working...
          X