![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Sunday May 26th at 12PM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| Indicator Development Support for the development of custom indicators using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Member
Join Date: Jul 2009
Posts: 85
Thanks: 2
Thanked 4 times in 3 posts
|
I two indicators that I have created.
One draws lines over candle bodies, the other draws lines behind the bodies. What is controlling this behavior? |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Apr 2010
Location: Denver, CO, USA
Posts: 4,794
Thanks: 160
Thanked 568 times in 559 posts
|
Hello tulanch,
Thank you for your post. The order is determined by the order in which the plots were added to the chart. This cannot be changed programmatically, other than the order in which you are adding it. You can also change the Z-order manually from the chart itself New Chart Object Paint Ordering (z-order) As you select any object on a chart, hold down the SHIFT key and scroll with your mouse wheel, you can change the paint layer of the selected object in order to move it in front of or behind other drawn objects. In the image below, the rectangle is selected and is currently on "Level 5 of 5" meaning, it is at the very bottom of the paint order. You could scroll your mouse wheel to "Level 1 of 5" which would put the rectangle on top of all others objects.
Matthew
NinjaTrader Customer Service |
|
|
|
|
|
#3 | |
|
Senior Member
|
Quote:
Code:
Initialize()
{
// ...
Z-Order = -10; // forces a plot behind the price bars
}
|
|
|
|
|
|
|
#4 |
|
Member
Join Date: Jul 2009
Posts: 85
Thanks: 2
Thanked 4 times in 3 posts
|
As I mentioned I have 2 indicators I am comparing. When I first started this thread, neither of them had any Z order work done, yet one plotted infront and the other plotted behind.
In the one which is behind, I've attempted to use both methods, but neither seem to affect this display. I will mucking around with it... and report back.... I need to make the indicator selectable. Also in the one that does have the drawline in front, it has a region draw behind where as the other does not, perhaps that has some impact... |
|
|
|
|
|
#5 |
|
NinjaTrader Customer Service
Join Date: Dec 2009
Location: Denver, CO, USA
Posts: 6,498
Thanks: 109
Thanked 291 times in 280 posts
|
Hello,
To change z order on your own select one of the data series or indicators and then hold down shift and then scroll with your mouse wheel will allow you to push an indicator's z order below the other if you needed this done. Let me know if I can be of further assistance.
Brett
NinjaTrader Customer Service |
|
|
|
|
|
#6 |
|
Member
Join Date: Jul 2009
Posts: 85
Thanks: 2
Thanked 4 times in 3 posts
|
I belive I found an issue....
At one point in the past I changed the chart property "Allow the selection or drag/drop of a chart series " from True to False as I do a lot of trading on the chart and don't want to pick things...just a person preference... this is why I could not select it and change the Z order per prior instructions... Once I did set this back to True, I was able to change the Z order... Also, once I did this I could change the Z order value in the Indicator initiate method again, all working fine... But, if the chart I put the indicator in was created/initiated with "Allow the selection or drag/drop of a chart series " set to False.... (ie using a chart template) then the Z order value set within the initiate method seems to do nothing....and the drawn items are behind the candle bars.... I can repeat this... perhaps this is just be design... to me weirdness explained and I can managed.... maybe this thread will help others in future... |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Z Order controls | Light | Version 7 Beta General Questions & Bug Reports | 5 | 08-16-2010 09:50 AM |
| plot dash as default | velocity | General Programming | 2 | 02-04-2010 04:05 PM |
| Single plot Price Panel Display with multiple plot indicator | cclsys | Indicator Development | 5 | 11-19-2009 12:41 PM |
| Changing default plot display behavior question | redviking121 | Charting | 1 | 03-19-2009 09:05 AM |
| Default Plot Width and Location.. | nmussa | General Programming | 5 | 10-16-2007 07:00 AM |