Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

some help needed in Draw.ArrowLine()

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

    some help needed in Draw.ArrowLine()

    i have been using this feature for long time
    Draw.ArrowLine(NinjaScriptBase owner, string tag, int startBarsAgo, double startY, int endBarsAgo, double endY, Brush brush, DashStyleHelper dashStyle, int width)

    Until, i discovered the isglobal flag as it helps me to see the same arrow in multiple timeframes at same time.
    Draw.ArrowLine(NinjaScriptBase owner, string tag, DateTime startTime, double startY, DateTime endTime, double endY, bool isGlobal, string templateName)

    However, i lose the ablity to change the color of this arrowline. how can i change the color of the arrowline and also keep it global?

    #2
    Hello junkone,

    Thanks for your post.

    I have moved your post to the General Development section of the Forums since your question is about programming a custom NinjaScript.

    That said, when using the Draw.ArrowLine() overload that lets you specify the isGlobal argument, you could provide a templateName to set the color of the drawing object.

    Draw.ArrowLine(NinjaScriptBase owner, string tag, DateTime startTime, double startY, DateTime endTime, double endY, bool isGlobal, string templateName)

    You could create a Drawing Object Template for the ArrowLine DrawingTools, save the Drawing Object Template, and then specify the name of the Drawing Object Template for the 'templateName' argument when calling Draw.ArrowLine().

    For example, if you saved a Drawing Object Template for ArrowLine that sets the draw object to purple and pass the name of that Drawing Object Template for the templateName argument of Draw.ArrowLine(), the ArrowLine would be drawn with the color purple on the chart.

    See the help guide documentation below for more information.

    Understanding Drawing Object Templates: https://ninjatrader.com/support/help..._tools__ob.htm
    Draw.ArrowLine(): https://ninjatrader.com/support/help..._arrowline.htm
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    599 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    344 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    103 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    558 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    557 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X