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

drawing between panels

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

    drawing between panels

    Hello, i want to write an indicator on a chart that has 2 panels. In each panel will be a different bar type for the same contract. Eg both panels with have same pricing in the Y axis.
    If i have a line i move in panel 1 i want to be able to track it and then move a similar line in the lower panel - so they are adjusting to the same price.
    i will start this to manage 1 line or do 1 line per indicator added.

    Is it possible for the ninjascript in panel 1 to set the Y coordinates of the line in panel 2 and thus the line will automatically adjust ?
    the line will be attached to series 2 in panel 2 - can i access this and the properties of the line to set the Y (price)?
    thanks

    #2
    Hello soulfx,

    Thank you for your note.

    You could certainly have the indicator in panel 1 create a global line - this would appear on all other charts of the same instrument. When your script in panel 1 adjusts the position of the global line, it would adjust in all other panels.

    You would need to use one of the overloads for Draw.Line() that uses the IsGlobal overload:

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



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

    Kate W.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by cyberpete76, 03-27-2023, 12:29 AM
    7 responses
    265 views
    1 like
    Last Post slightly  
    Started by renewsaltwater, Today, 01:15 AM
    0 responses
    2 views
    0 likes
    Last Post renewsaltwater  
    Started by slightly, Today, 12:49 AM
    0 responses
    3 views
    0 likes
    Last Post slightly  
    Started by sdauteuil, 09-23-2021, 10:16 AM
    4 responses
    1,209 views
    0 likes
    Last Post jacobpescaia44  
    Started by agclub, 04-21-2024, 08:57 PM
    5 responses
    36 views
    0 likes
    Last Post agclub
    by agclub
     
    Working...
    X