Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Adding DASH options to an exisitng indicator - Repeater
Collapse
X
-
Hi rdtdale,
I noticed that you need to add a variable for "Draw.RegionHighlightX". Next, you can set the style for it.
Below is the example:
Code:if (toolType[i] == ToolSelector.TimeRegion) { DateTime test = Time[0].Date + startStop[i, 2]; RegionHighlightX rH = Draw.RegionHighlightX(this, label[i], Time[CurrentBar - beginBar[i]], test, showOutline[i] ? brushColor[i] : Brushes.Transparent, brushColor[i], opacity[i]); rH.OutlineStroke = new Stroke(brushColor[i], DashStyleHelper.DashDot, 1); }
Regards,
JoyLast edited by ninZa; 08-05-2024, 07:08 AM.
-
Comment
-
Hi rdtdale,
If you want to add an option so the user can choose the style for the line, please follow the steps below:
1. At the "Properties" region, please add a property named "LineStyle", this property will refer to a lineStyle variable, and their type is "Stroke".
2. At the "variables" region, add a variable named "lineStyle" (type "Stroke").
3. Now, you can set the style for your drawing object. Just set the outline style of the object equal to the "LineStyle" property.
4. The user can change the line style in the settings window by changing the value of the "Line Style" parameter in the "Graphics" section.
I Attached a picture and a modified file below. Please download it for more details.
Regards,
Danny
Comment
-
Hi ninZa...thanks for this....this language seems quite complex to learn. I added what you suggested at the ARROWS and it work partly. The region would show the DASH but only on one of the lines. I use this to create 90 min windows for AMD, and also 30 min windows for macro time to look for a setup based on a Breaker Block. So far this code is the closet for NT...contacting the original Author did not work. Thanks again.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CaptainJack, 05-29-2026, 05:09 AM
|
0 responses
213 views
0 likes
|
Last Post
by CaptainJack
05-29-2026, 05:09 AM
|
||
|
Started by CaptainJack, 05-29-2026, 12:02 AM
|
0 responses
128 views
0 likes
|
Last Post
by CaptainJack
05-29-2026, 12:02 AM
|
||
|
Started by charlesugo_1, 05-26-2026, 05:03 PM
|
0 responses
146 views
0 likes
|
Last Post
by charlesugo_1
05-26-2026, 05:03 PM
|
||
|
Started by DannyP96, 05-18-2026, 02:38 PM
|
1 response
229 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
192 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|

Comment