if (rangeColor == Color.Transparent) opacity = 0;
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Shadows created by DrawRegion
Collapse
X
-
Thank for your answer. I can use a workaround such as
so it is no problem.Code:
Originally posted by NinjaTrader_Josh View Post
-
Harry,
Unfortunately development has informed me that is simply how .NET handles opacity on transparent colors.
Leave a comment:
-
I used the same opacity for three different colours, opacity was set to 5. I expected that transparent is transparent even with opacity 5!
Originally posted by NinjaTrader_Bertrand View PostHarry, to add - what opacity's were you using for your rectangles drawn? My demo below in on 0.
Leave a comment:
-
-
Hi Harry, I'm seeing the same here on a black background - will clarify why this is the case. Thanks
Leave a 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.
Leave a 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.
Leave a comment:
-
Hi 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.
Leave a comment:
-
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.
Leave a comment:
-
Hi Harry, could reproduce an issue here with the Pivots call - we look into, thanks for reporting.
Leave a comment:
-
I use Kinetick data for EOD and Interactive Brokers for Intraday Data.
I tested this while being not connected -> no access possible,
Originally posted by NinjaTrader_Bertrand View PostHarry, with which data feed are you working? Would it provide native daily bars to calc those pivots in the daily data mode?
Leave a comment:
-
Harry, with which data feed are you working? Would it provide native daily bars to calc those pivots in the daily data mode?
Leave a comment:
-
I coded a second indicator now. I can handle the drawing problem with this. The separate indicator catches the DataSeries from the other indicators, calculates the rectangles and plots them behind price and the lines of the other indicators.
However there is a new problem, now. If I call the pivots indicator in DailyBars mode, it does not work. For example
always returns the value 0, whereasPHP Code:double mainpivot = 0; mainpivot = Pivots(PivotRange.Daily,HLCCalculationMode.DailyBars,0,0,0,20).PP.Get(CurrentBar);
works correctly.PHP Code:double mainpivot = 0; mainpivot = Pivots(PivotRange.Daily,HLCCalculationMode.CalcFromIntradayData,0,0,0,20).PP.Get(CurrentBar);
Any help would be appreciated, just trying to draw clean rectangles behind price.
Leave a comment:
-
Harry, sorry for my late reply - I'll check into the default ZOrders assigned in our Draw methods.
Yes, the 2 indicators should do it, ZOrder -1 worked well in my test to default the DrawRectangle behind the price bars.
Leave a comment:
-
Only solution might be to write two indicators.
Indicator 1 plots the lines and the text.
Indicator 2 plots the filled ranges by using DrawRectangle() and by referencing indicator 1. The second indicator would be initialized with ZOrder = -1, so the rectangles will hopefully plot behind the rest of the chart.
Just would need to reference a BoolSeries ("plot" or "do not plot"), two DataSeries containing the upper and lower range and one DataSeries containing the sessionCount to create the tags.
Would this work?
Leave a comment:
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CarlTrading, 03-31-2026, 09:41 PM
|
1 response
82 views
1 like
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
43 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
64 views
2 likes
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
68 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
56 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Leave a comment: