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

Draw.Line() Global doesn´t works

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

  • Nutriax
    replied
    Hello Jim/Paul,
    Thank you very much for your support on this, its working now! I had a problem at my side and I was able to figure it out when I review the example code that you posted Jim.

    I really appreciate! thanks a lot!

    Leave a comment:


  • NinjaTrader_Jim
    replied
    Hello Nutriax,

    Are you using the Drawing method overload that allows specifying isGlobal like Paul suggests?

    When I test the method overload Paul suggests, I see the global drawing object on other charts of the same instrument.

    Please see the attached script and screenshot for a working example.
    Attached Files

    Leave a comment:


  • Nutriax
    replied

    Hello, thank you for your quick response on this.
    I already checked and I have enable the "show global draw objects" in the data series of the ticks chart, but it is not displaying the lines.
    Also I used the same reference that you sent and the lines are drawed in the original chart (which has the indicator) but not in other ones, as I show you in the previous screenshot.)
    What else can I try?

    Thank you for your help on this.

    Attached Files

    Leave a comment:


  • NinjaTrader_PaulH
    replied
    Hello Nutriax,

    Thanks for your post.

    A global draw object will appear on all charts of the same instrument (unless "show global draw objects" is specifically excluded in the Data series settings)

    In order to draw a global line you would need to use the Draw.Line() method overload that uses the bool IsGlobal. The one that fits what you have posted would be:

    Draw.Line(NinjaScriptBase owner, string tag, bool isAutoScale, int startBarsAgo, double startY, int endBarsAgo, double endY, bool isGlobal, string templateName)

    Reference: https://ninjatrader.com/support/help...?draw_line.htm

    I will move this thread to the NinjaTrader8 indicators forum.

    Leave a comment:


  • Nutriax
    started a topic Draw.Line() Global doesn´t works

    Draw.Line() Global doesn´t works


    Hi team,
    I am trying to draw a line from my indicator script and I want to this line be global, so I can see the line in the ES chart for candle or ticks, but it doesn{t works.
    I use the following code to draw the lines:
    PHP Code:
    Draw.Line(this,lineNameBefore+"2",truebasrAgo,barsAgoY,0,barsAgoY,""); 
    the results is in the screenshots.
    What I am doing wrong? the global only works with the same type of charts?

    Thanks in advance.

    Attached Files

Latest Posts

Collapse

Topics Statistics Last Post
Started by Balage0922, 10-01-2022, 01:25 AM
3 responses
71 views
0 likes
Last Post Balage0922  
Started by ViolaLundgrn, Today, 02:23 AM
0 responses
1 view
0 likes
Last Post ViolaLundgrn  
Started by iceman2020, Yesterday, 06:52 AM
1 response
39 views
0 likes
Last Post NinjaTrader_Jason  
Started by BobbSpann, Today, 02:08 AM
0 responses
1 view
0 likes
Last Post BobbSpann  
Started by 2inthebush, 05-03-2022, 05:09 PM
3 responses
172 views
0 likes
Last Post veyvey
by veyvey
 
Working...
X