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 Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    576 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    334 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    553 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    551 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X