Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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
    Brandon H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by llanqui, Today, 10:32 AM
    0 responses
    1 view
    0 likes
    Last Post llanqui
    by llanqui
     
    Started by StockTrader88, 03-06-2021, 08:58 AM
    45 responses
    3,992 views
    3 likes
    Last Post johntraderuser2  
    Started by TAJTrades, Today, 09:46 AM
    0 responses
    7 views
    0 likes
    Last Post TAJTrades  
    Started by rhyminkevin, Yesterday, 04:58 PM
    5 responses
    62 views
    0 likes
    Last Post dp8282
    by dp8282
     
    Started by realblubb, Today, 09:28 AM
    0 responses
    8 views
    0 likes
    Last Post realblubb  
    Working...
    X