SetZOrder
<< Click to Display Table of Contents >> SetZOrder |
Used to assign a unique identifier representing the index in which chart objects are drawn on the chart's Z-axis (front to back ordering). Objects with a higher ZOrder are drawn first.
Note:
1. To check on which ZOrder index the object gets drawn use the ZOrder property. 2. Assigning specific ZOrder indices to draw at should be done once the State has reached State.Historical 3. If you want to draw your object behind the bars, assign to use index -1 (like in the example below) 4. If you want to draw your object topmost, assign to use index int.MaxValue 5. Any levels in between can be directly assigned, the starting / default levels used by NinjaTrader can be seen here. 6. You can see the highest ZOrder currently in a chart with code such our second example below - setting higher values than this value will result in the ZOrder to be set to this value, so this can be thought of as the current 'top'. |
This method does not return a value
SetZOrder(int DesiredZOrderLevel)
protected override void OnStateChange() |
protected override void OnRender(ChartControl cc, ChartScale cs) |