Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Remove Area and Line from Arc

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

    Remove Area and Line from Arc

    Hello,

    I would like to remove the area (make it transparent) and the line from the Arc (make it also transparent).

    How can I assign a property to do that?

    In the help file there is no option for that, right?

    Kind regards
    Gerik

    #2
    Hello Gerik,

    Thank you for writing in.

    One way you could programmatically draw an arc with a transparent area and line would be to save a drawing tool template with the area and line colors saved as transparent. To create this template, you would need to draw an arc manually on a chart and then double-click it to open the drawing tools window. Adjust the properties as desired then in the bottom-right of the window select template > save. From there, in your script you may use syntax to draw your arc that prompts for the template name:
    Draw.Arc(NinjaScriptBase owner, string tag, int startBarsAgo, double startY, int endBarsAgo, double endY, bool isGlobal, string templateName)
    Draw.Arc(NinjaScriptBase owner, string tag, DateTime startTime, double startY, DateTime endTime, double endY, bool isGlobal, string templateName)​



    Otherwise, you may access the arc's properties as long as you have saved it to an arc object in your script as shown in the example on this page:
    Code:
    // Draw an Arc object
    Arc myArc = Draw.Arc(this, "myArc", Time[10], Close[10], Time[0], Close[0], Brushes.Blue);
    
    // Set the opacity of the shading between the arc and the chord
    myArc.AreaOpacity = 100;
    To remove the area, you would need to set the AreaBrush to transparent:
    myArc.AreaBrush = Brushes.Transparent;
    To set the line to transparent, you may access myArc.Stroke.Brush:
    myArc.Stroke.Brush = Brushes.Transparent;

    Please let us know if we may be of further assistance.​​

    Comment


      #3
      Thank you Emily.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      47 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      22 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      33 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      50 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      42 views
      0 likes
      Last Post CarlTrading  
      Working...
      X