Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Draw line inside indicator inside all charts of workspace

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

    Draw line inside indicator inside all charts of workspace

    Hello,
    I have indicator, which draws line to chart under mouse cursor (when I click). I want to draw this line on all charts (with lower timeframe). E.G. I add indicator on 60minute time frame, click chart and I want to draw this line on 30min, 10min timeframe -> i have 3 charts in workspace.

    Is it possible to do that? Could you please provide, piece of code?

    Thanks for help

    Pavel

    #2
    Hello Pavel,

    Thanks for your post.

    Indicators are only allowed to draw to the panel that they own, and it would not be possible to draw to other panels or other charts without having an instance of that indicator on that other chart/panel to draw on that chart/panel. You could use the parameter for your drawing method to make a global drawing object, however.

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

    We are tracking interest to be able to selectively set global drawing objects to specific charts instead of all charts. I have submitted votes for this feature request on your behalf.

    Selective Global Draw Objects - SFT-415

    We collect interest in feature requests before determining if the feature should be implemented. For that reason we cannot offer an ETA or promise of fulfillment. Upon implementation, the number for the ticket ID can be publicly found in the Release Notes page of the help guide. I will provide a link below.

    Release Notes - https://ninjatrader.com/support/help...ease_notes.htm

    Let us know if you have any additional questions.
    Last edited by NinjaTrader_Jim; 09-02-2019, 03:20 PM.

    Comment


      #3
      You can do it with a workaround. A Master/Slave indicator. With Master indicator, you draw your line and then this master indicator could write an XML file, with your line data. This XML can be read by the slave indicator, which plots your Line on your other charts.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      81 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      42 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      64 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      66 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      54 views
      0 likes
      Last Post CarlTrading  
      Working...
      X