• 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

Draw.Text plotting behind the indicator plot at random

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

  • Harry
    started a topic Draw.Text plotting behind the indicator plot at random

    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

  • NinjaTrader_JoshG
    replied
    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

    Leave a comment:


  • Harry
    replied
    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.

    Leave a comment:


  • NinjaTrader_JoshG
    replied
    Hello Harry,
    Thanks for your post.

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

    Leave a comment:


  • Harry
    replied
    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.

    Leave a comment:

Latest Posts

Collapse

Topics Statistics Last Post
Started by uiwislth, Yesterday, 11:25 PM
0 responses
4 views
0 likes
Last Post uiwislth  
Started by Steve L, Yesterday, 10:04 PM
0 responses
3 views
0 likes
Last Post Steve L
by Steve L
 
Started by marianfed, Yesterday, 09:47 PM
0 responses
4 views
0 likes
Last Post marianfed  
Started by hir04068, Yesterday, 09:29 PM
0 responses
2 views
0 likes
Last Post hir04068  
Started by iq200, 03-11-2018, 07:49 PM
24 responses
1,021 views
0 likes
Last Post mrlucky1x  
Working...
X