Announcement

Collapse
No announcement yet.

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.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    67 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    95 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    53 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    108 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    63 views
    0 likes
    Last Post PaulMohn  
    Working...
    X