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 on all chartS

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

    Draw line on all chartS

    Hi

    How can draw line on all chartS from indicator working on the chart
    also we can do it hands ?
    example
    DrawVerticalLine(string tag, int barsAgo, Color color).OnAllCharts

    #2
    Hi Nikoli,

    From a NinjaScript, unfortunately this is not possible at this time, though it's something we're considering for future releases.

    By hand, this feature is available in NinjaTrader 7.

    Please see "Local vs. Global drawing objects" at - http://www.ninjatrader.com/support/h..._tools__ob.htm
    TimNinjaTrader Customer Service

    Comment


      #3
      Hello,

      So you want to draw lines on all of the chart, but do it by hand? Tim is correct, but there may be a work around. Its not exactly what you want and I'd have to look into it in more detail, but if you had an indicator that could draw a line on a chart at a certain location that is set by you in the indicator parameters, you could save that as an template then apply that template to the other charts. It would be quicker and more accurate than hand drawing all of the lines, but not as fast as what you indicate you want below.

      PM me if you want me to discuss further...
      Last edited by mountainclimber; 05-07-2010, 10:26 AM.

      Comment


        #4
        Originally posted by NinjaTrader_Tim View Post
        Hi Nikoli,

        From a NinjaScript, unfortunately this is not possible at this time, though it's something we're considering for future releases.

        By hand, this feature is available in NinjaTrader 7.

        Please see "Local vs. Global drawing objects" at - http://www.ninjatrader.com/support/h..._tools__ob.htm
        Tim,

        Is it possible right now?

        Thanks!

        Comment


          #5
          Hello rafaelmarcos,

          Thank you for your post and welcome to the NinjaTrader Support Forum!

          It is not possible to do so in NinjaTrader 7, however NinjaTrader 8 has added the overload 'isGlobal' to it's drawing tool functions to allow for this very behavior. You can view the Drawing Tools and their overloads at the following link: http://ninjatrader.com/support/helpG...us/drawing.htm

          Please let me know if you have any questions.

          Comment


            #6
            In NT8, can the "isGlobal" property be set AFTER instantiating the drawing object?

            I have an indicator that calls the Fibonacci Retracement drawing tool, using one of the overloads that do NOT use the isGlobal argument.

            After my indicators calls the drawing tool, like this for example

            var myFibo = Draw.FibonacciRetracements......

            why can't I do this:

            myFibo.isGlobalDrawing ?

            I get the error that this is a read-only property.

            I've also tried myFibo.AttachedTo, and again this seems to be a read-only property.

            Any suggestions?

            Comment


              #7
              Hello,

              Thank you for the post.

              In this case the property is read only so you would be unable to set it later due to how the objects work. I would likely suggest that when you need to later change this to a global object that you call the correct overload with the same tag name.

              For example:

              Code:
              protected override void OnBarUpdate()
              {
                       if(State == State.Historical)
              		Dot dot =	Draw.Dot(this, "tag", true, 0, Close[0], Brushes.Red);
              		
              	if(State == State.Realtime)
              		Draw.Dot(this, "tag", true, 0, Close[0], true, "");
              }
              I look forward to being of further assistance.
              JesseNinjaTrader Customer Service

              Comment


                #8
                Thanks Jesse.

                I didn't realize the overloads allowed sending blank "" for a template name.

                That did it for me, thanks again.

                Originally posted by NinjaTrader_Jesse View Post
                Hello,

                Thank you for the post.

                In this case the property is read only so you would be unable to set it later due to how the objects work. I would likely suggest that when you need to later change this to a global object that you call the correct overload with the same tag name.

                For example:

                Code:
                protected override void OnBarUpdate()
                {
                         if(State == State.Historical)
                		Dot dot =	Draw.Dot(this, "tag", true, 0, Close[0], Brushes.Red);
                		
                	if(State == State.Realtime)
                		Draw.Dot(this, "tag", true, 0, Close[0], true, "");
                }
                I look forward to being of further assistance.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by adeelshahzad, Today, 03:54 AM
                4 responses
                25 views
                0 likes
                Last Post adeelshahzad  
                Started by merzo, 06-25-2023, 02:19 AM
                10 responses
                823 views
                1 like
                Last Post NinjaTrader_ChristopherJ  
                Started by frankthearm, Today, 09:08 AM
                5 responses
                17 views
                0 likes
                Last Post NinjaTrader_Clayton  
                Started by jeronymite, 04-12-2024, 04:26 PM
                3 responses
                43 views
                0 likes
                Last Post jeronymite  
                Started by yertle, Today, 08:38 AM
                5 responses
                16 views
                0 likes
                Last Post NinjaTrader_BrandonH  
                Working...
                X