Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Draw.Text plotting behind the indicator plot at random

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

    Draw.Text plotting behind the indicator plot at random

    I have a simple indicator that uses both Draw.Text and a custom plot.

    When I add the indicator to a chart, Draw.Text sometimes draws behind the custom plot and sometimes it draws on top of the plot. These two cases are also different when it comes to the number of plot levels on the chart.

    Case 1: Draw.Text plots on top of the plot (as it should be). When I select a text object via Shift + Mouse Wheel it shows level 2 of 2. In this case level 1 is used for the price bars, and level 2 is used for the indicator including the text objects.

    Case 2: Draw.Text plots behind the plot (see chart attached). When I select a text object via Shift + Mouse Wheel it shows level 4 of 4. In this case level 4 is used for the text objects, while level 2 or 3 is used for the plot and level 1 is used for the price bars. One of those levels is a mystery level with no objects attached to it, as there is nothing else on the chart than the price bars, the plot and the text objects.

    Why does the same indicator use 2 levels in case 1 and 4 levels in case 2? NinjaTrader has always had problems controlling the ZOrder of different objects, but the random behavior I am observing here is more than strange.

    Is it possible to control the behavior programmatically? ZOrder does not help, as it only controls the level of the plot relative to the price bars, while the behavior of Draw.Text remains random.

    Please find attached screenshot of the two cases. Both screenshots show the same single indicator added to the same chart.
    Attached Files

    #2
    I have now observed a third case.

    Case 3: Draw.Text plots behind the plot. When I select a text object via Shift + Mouse Wheel it shows level 3 of 3. In this case level 3 is used for the text objects drawn via Draw.Text, while level 2 is used for the plot and level 1 is used for the price bars.

    This means that when NinjaTrader adds the very same indicator to a chart it will sometimes use 2 plot levels, sometimes 3 plot levels or in some cases 4 plot levels, all at random. When it uses 3 or 4 levels, Draw.Text objects are sitting behind the plot, when there are 2 levels the text objects are on top of the plot as expected.

    Comment


      #3
      Hello Harry,
      Thanks for your post.

      I will look into this and report back here with more info
      Josh G.NinjaTrader Customer Service

      Comment


        #4
        Originally posted by NinjaTrader_JoshG View Post
        Hello Harry,
        Thanks for your post.

        I will look into this and report back here with more info

        Hello Josh,

        Thank you for your answer. I do not want to attach the indicator here, but would send it to you via e-mail, if you wish.

        Comment


          #5
          Hey Harry,
          I have not had a chance to look at it yet, but the more I have to work with the better.

          You can export your script by going to Tools > Export > NinjaScript Add On > Add > select your script > OK > Export > name the file 'NTsupport' > Save. The file will be located under Documents\NinjaTrader 8\bin\Custom\ExportNinjaScript. Please attach the file to your response.

          Please reference this forum post in your email to PlatformSupport(AT)NinjaTrader(DOT)com
          Josh G.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Waxavi, Today, 02:10 AM
          0 responses
          6 views
          0 likes
          Last Post Waxavi
          by Waxavi
           
          Started by TradeForge, Today, 02:09 AM
          0 responses
          11 views
          0 likes
          Last Post TradeForge  
          Started by Waxavi, Today, 02:00 AM
          0 responses
          2 views
          0 likes
          Last Post Waxavi
          by Waxavi
           
          Started by elirion, Today, 01:36 AM
          0 responses
          4 views
          0 likes
          Last Post elirion
          by elirion
           
          Started by gentlebenthebear, Today, 01:30 AM
          0 responses
          5 views
          0 likes
          Last Post gentlebenthebear  
          Working...
          X