Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Shadows created by DrawRegion
Collapse
X
-
Thanks for your answer.Originally posted by NinjaTrader_Bertrand View PostHi Harry, could reproduce an issue here with the Pivots call - we look into, thanks for reporting.
This really has become complicated. Call it the pain of a NinjaTrader user. This is the whole story.
Objective: I just want to color a horizontal trading range on my with an indicator.
Step 1: Try DrawRegion(). Result: The Baloo - Speech Bubble look. No way to code away the convex shape of the left and right border. Abandoned.
Step 2: Try DrawRectangle(). Result: Trading range is correctly colored, but the color draws on top of the lines and text, making them invisible. With Zorder = -1, it is possible to place the colored range behind price, but all lines plotted from within the indicator are hidden by DrawRegion(), There is no way to differentiate the layer for the drawing object within an indicator. Abandoned.
Step 3: I decide to to write a new indicator, by exposing the required data via DataSeries and catch the values with the new indicator. The new indicator works well, collects the data and by using Zorder = -1 within the indicator code, I can now plot the trading range behind all other lines and text. I am temporarily happy as my indicator works for the opening range, which is calculated from intraday data. Unfortunately, I also want to display pivot ranges, with the pivot indicator running in DailyBars mode collecting the Kinetick data. I am quite disappointed, as I understand that my newly coded indicator cannot use the values from my pivots (or the NinjaTrader pivots) indicator. Abandoned
Step 4: I code an entirely new indicator calculating the pivots, pivot ranges and opening ranges from the instrument sessions and offsets just to display the opening, night session and pivot range. I have been successful, but it took me an entire day just to colour an existing range on my chart. There is room for improvement.
Chart attached.
Comment
-
Thanks for answering.
Many Draw() methods need a clean up.
-> had lots of issues with diamonds in NT 6.5., they were quick to add, but I had to wait several minutes to remove them
-> many of them decorating the right margin of the chart
-> speech bubble look of draw region
-> rectangles cannot be taught to plot behind price
I think it is not a great deal to improve this.
Originally posted by NinjaTrader_Bertrand View PostHi Harry - I'm sorry for the frustrations getting this to work the way you expected, we're checking into the issues you unfortunately stumbled upon on the way.
Comment
-
Not transparent
Here is another example.
I use the DrawRectangle() method to draw rectangles on my chart.
Another problem is this. If I set one of the serialized colours to transparent via indicator dialogue box, the rectangles are not transparent at all. All other colours that I select show as expected. Please advise.
Comment
-
-
Thank for your answer. I can use a workaround such as
so it is no problem.Code:if (rangeColor == Color.Transparent) opacity = 0;
Originally posted by NinjaTrader_Josh View PostHarry,
Unfortunately development has informed me that is simply how .NET handles opacity on transparent colors.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
598 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
343 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
556 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
555 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment