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
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
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.htmBrandon H.NinjaTrader Customer Service
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 FilesBrandon H.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by burtoninlondon, Today, 12:38 AM
|
0 responses
10 views
0 likes
|
Last Post Today, 12:38 AM | ||
Started by AaronKoRn, Yesterday, 09:49 PM
|
0 responses
14 views
0 likes
|
Last Post
by AaronKoRn
Yesterday, 09:49 PM
|
||
Started by carnitron, Yesterday, 08:42 PM
|
0 responses
11 views
0 likes
|
Last Post
by carnitron
Yesterday, 08:42 PM
|
||
Started by strategist007, Yesterday, 07:51 PM
|
0 responses
14 views
0 likes
|
Last Post Yesterday, 07:51 PM | ||
Started by StockTrader88, 03-06-2021, 08:58 AM
|
44 responses
3,983 views
3 likes
|
Last Post
by jhudas88
Yesterday, 06:59 PM
|
Comment