Wt1[0] = xx[0];
if (Wt1[0] > 0)
Draw.Region(this, "Wt1UP", CurrentBar, 0, Wt1, zero[0], Plots[3].Brush, Plots[3].Opacity);
if (Wt1[0] < 0)
Draw.Region(this, "Wt1DN", CurrentBar, 0, Wt1, zero[0], Plots[3].Brush, Plots[3].Opacity);
Wt2[0] = SMA(Wt1, 4)[0];
if (Wt2[0] > 0)
Draw.Region(this, "Wt2UP", CurrentBar, 0, Wt2, 0, Plots[4].Brush, Plots[4].Opacity);
if (Wt2[0] < 0)
Draw.Region(this, "Wt2DN", CurrentBar, 0, Wt2, 0, Plots[4].Brush, Plots[4].Opacity);
Diff[0] = Wt1[0] - Wt2[0];
if (Diff[0] > 0)
Draw.Region(this, "DiffUP", CurrentBar, 1, Diff, 0, Plots[5].Brush, Plots[5].Opacity);
if (Diff[0] < 0)
Draw.Region(this, "DiffDN"+CurrentBar, 1, 0, Diff, zero[0], Plots[5].Brush, Plots[5].Opacity);
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Unable to get region to fill
Collapse
X
-
Unable to get region to fill
I've tried to get the region between 0 and the plot to fill in unsuccessfully. Can someone please help me sort this out? The plots are displayed on the chart and I've made numerous attempts based on what's been discussed in the forum here and on the help guides but cannot seem to get it right. Wt1, Wt2, and Diff are oscillator examples I'm trying to shade the region between the plot line and zero.
Code:Tags: None
-
I found the issue DrawOnPricePanel was set to true.
Is there an example script that features SetZOrder? I understand it's not an often utilized item, but the documentation for it seems like it could be a bit more verbose and additional examples might be helpful.Last edited by Conceptzx; 01-14-2024, 11:35 AM.
-
Hello Conceptzx,
Thanks for your notes.
I am happy to hear you resolved the issue.
We do not have a reference sample available demonstrating the use of SetZOrder() specifically.
See the help guide documentation below for more information.
SetZOrder(): https://ninjatrader.com/support/help.../setzorder.htm
ZOrder: https://ninjatrader.com/support/help...art_zorder.htm<span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>
Comment
-
Hello Conceptzx,
Thanks for your notes.
SetZOrder() should be done once the State has reached State.Historical.
Attached is a very simple test script demonstrating setting the z order so an indicator plot appears behind the bars on a chart.
SetZOrder(): https://ninjatrader.com/support/help.../setzorder.htm
ZOrder: https://ninjatrader.com/support/help...art_zorder.htmAttached Files<span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
582 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
338 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
103 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
554 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
552 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment