Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Shadows created by DrawRegion
Collapse
X
-
Had to go back to the Baloo - Speech Balloon look of DrawRegion().
Reason: DrawRectangle() covers recklessly all bars and lines, where as DrawRegion() stays politely behind.
I would like to know why all of these Draw Functions are coded in a different way. There seems to be no logic behind the design, but they just seem to work at random. Some draw behind other indicators, other above. Some react to the initialization with ZOrder = -1, others don't. Some draw on the right margin of the chart, some don't.
Does this follow any concept?
-
Further strange finding
Further finding:
DrawRegion plots behind the lines and text, Draw Rectangle plots above the lines and text. Why is that?
Leave a comment:
-
-
I had used unique DrawRegions for each day (different tags), did not help at all.
Originally posted by NinjaTrader_Bertrand View PostGreat idea, Reset would only apply to the plot for visualization purposes. I believe as workaround a unique DrawRegion for each day would help.
Leave a comment:
-
-
Great idea, Reset would only apply to the plot for visualization purposes. I believe as workaround a unique DrawRegion for each day would help.
Leave a comment:
-
Have now replaced DrawRegion() with DrawRectangle(). The latter method plots properly, as opposed to DrawRegion(). With ZOrder set to -1, rectangles plot nicely behind price.
Leave a comment:
-
That is correct. How can I draw regions that look correct then?
If I reset -> does not work
If I set to zero -> does not work, the speech balloon will point to zero
So whatever I do, no correct region is drawn between two horizontal lines or even other data series, if these are session related. Reset() should do the trick and tell DrawRegion() not to draw.
Leave a comment:
-
Harry, looking at your code this issue seems to be related to pivots plot value being reset on the first bar of the session, hence the DrawRegion would have the Close price value at this point, this is what you see visualized.
Leave a comment:
-
Problem is independent from Infinite/256 lookback.
I have coded an indicator by adding just a few lines to the native NinjaTrader pivots indicator. Chart and indicator attached.
The problem:
When I reset the two data series that contain the region to be drawn, DrawRegion plots a triangle from the upper and lower border of the region to price (next bar). When the dataseries changes back from Reset() to display a value, DrawRegion draws a reverse triangle from price to the upper and lower border.
The region gets a convex shape, or in the chart below, an appearance like a speech balloon.Last edited by Harry; 08-17-2010, 10:30 AM.
Leave a comment:
-
Harry, can you please share the code so I can look into on my end? Were you using Infinite or 256 for the DataSeries?
Leave a comment:
-
-
Sorry, was my own fault!
The shadow was my own fault, discoverd this today.
However, DrawRegion() will not always work correctly with NT7, if Maximum bars look back is set to "TwoHundredFiftySix". This is as expected, and it will display correctly, once you change it to "Infinite". That is due to the trade-off between RAM use and perfection.
Leave a comment:
-
If anybody runs into an unexpected outcome based on the previous info posted here, please either post your code demonstrating the issue or send us a note to support at ninjatrader dot com and reference this thread so we can check into.
Thanks for the support.
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: