Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Shadows created by DrawRegion
Collapse
X
-
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.
Comment
-
-
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?
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?
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
PHP Code:double mainpivot = 0;
mainpivot = Pivots(PivotRange.Daily,HLCCalculationMode.DailyBars,0,0,0,20).PP.Get(CurrentBar);
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.
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?
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by FAQtrader, 04-25-2024, 12:00 PM
|
6 responses
95 views
0 likes
|
Last Post
by blkbird
Today, 09:57 AM
|
||
Started by bee1943, Today, 09:55 AM
|
0 responses
7 views
0 likes
|
Last Post
by bee1943
Today, 09:55 AM
|
||
Started by giulyko00, Yesterday, 11:49 AM
|
4 responses
24 views
0 likes
|
Last Post
by giulyko00
Today, 09:51 AM
|
||
Started by NUVERSA, Today, 09:31 AM
|
1 response
10 views
0 likes
|
Last Post Today, 09:49 AM | ||
Started by rene69851, 05-02-2024, 03:25 PM
|
2 responses
29 views
0 likes
|
Last Post Today, 09:38 AM |
Comment