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 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.
    JimNinjaTrader Customer Service

    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 andrewtrades, Today, 04:57 PM
      1 response
      4 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by chbruno, Today, 04:10 PM
      0 responses
      3 views
      0 likes
      Last Post chbruno
      by chbruno
       
      Started by josh18955, 03-25-2023, 11:16 AM
      6 responses
      436 views
      0 likes
      Last Post Delerium  
      Started by FAQtrader, Today, 03:35 PM
      0 responses
      6 views
      0 likes
      Last Post FAQtrader  
      Started by rocketman7, Today, 09:41 AM
      5 responses
      19 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Working...
      X