Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Adding DASH options to an exisitng indicator - Repeater

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Adding DASH options to an exisitng indicator - Repeater

    This indicator repeats Zone displays for many uses. However the Outline for each zone is a SOLID Vertical line. Looking for someone to add code to allow Dash to be selected for the Outline.
    Attached Files

    #2
    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,
    Joy
    Last edited by ninZa; 08-05-2024, 07:08 AM.
    ninZa
    NinjaTrader Ecosystem Vendor - ninZa.co

    Comment


      #3
      Hello...I am not an advanced programmer, but I found the variable and kept the original line and added the new variable just below. Saved and compiled without error. Howver I do not see anything in the menu when I select the TImeRegion. Attached is what I see in menu.
      Click image for larger version

Name:	Repeater2.2 screenshot 2024-08-05 135037.png
Views:	82
Size:	24.2 KB
ID:	1312989

      Comment


        #4
        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
        Attached Files
        ninZa
        NinjaTrader Ecosystem Vendor - ninZa.co

        Comment


          #5
          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 Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          628 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          361 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          105 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          564 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          568 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X