Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Draw on price and chart panel

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

    Draw on price and chart panel

    Hello NT support,
    how can I draw using an indicator in price and indicator panel itself at once? I'd like to draw an rectange an indicator panel, and text, and other graphics on price panel. I found an method: DrawOnPricePanel = false; so I can only draw on indicator, but in this case can't avaible on the price panel . I'd like to use to Graphics.FillRectangle to draw on indicator, but there isn't enough information to right function.
    How can I reach to draw on the both panel at once?

    Thanks. Tom

    #2
    Hello marotom,

    Thank you for your post.

    The only supported technique for drawing on both indicator panel and price panel is to use two separate indicators.

    We are currently tracking the suggestion to draw on both panels with ID # 845.

    Some users report success dynamically setting DrawOnPricePanel, so you may want to check our Support Forum to see what others have been able to do. However, this is a custom drawing technique using C# and is not supported by us.

    Google search on DrawOnPricePanel: http://www.google.com/search?q=DrawO...injatrader.com

    Please let me know if I may be of further assistance.

    Comment


      #3
      Originally posted by marotom View Post
      Hello NT support,
      how can I draw using an indicator in price and indicator panel itself at once? I'd like to draw an rectange an indicator panel, and text, and other graphics on price panel. I found an method: DrawOnPricePanel = false; so I can only draw on indicator, but in this case can't avaible on the price panel . I'd like to use to Graphics.FillRectangle to draw on indicator, but there isn't enough information to right function.
      How can I reach to draw on the both panel at once?

      Thanks. Tom

      Work through this thread, and by the time you are done, you should be able to do what you want to do.



      Essentially, you must explicitly set DrawOnPrice Panel in the Initialize() event, then switch its value to draw on the PricePanel or IndicatorPanel as needed. NT support asserts that that is not the intended design; it just happens to work that way, if you know about it.
      Last edited by koganam; 01-23-2012, 04:51 PM. Reason: Corrected spelling and grammar

      Comment


        #4
        thanks Koganam for answer.
        Yes I've read this thread yet, but really does not work correctly in NT7x under all circumstances. I saw some other method to draw on the both panel using Graphics.FillRectangle/Graphics.DrawLine method. As can be seen in RValueCharts using Namespace: System.Drawing. I've read the MSDN section about it, but I can't solve this perfectly, since I'm not an advance coder. It gives me all the time an instance error. Could you write an working sample script with ths both method to demonstrate it, when it would be possible?

        Thanks. Tom
        Last edited by marotom; 01-23-2012, 05:04 AM.

        Comment


          #5
          Originally posted by marotom View Post
          thanks Koganam for answer.
          Yes I've read this thread yet, but really does not work correctly in NT7x under all circumstances. I saw some other method to draw on the both panel using Graphics.FillRectangle/Graphics.DrawLine method. As can be seen in RValueCharts using Namespace: System.Drawing. I've read the MSDN section about it, but I can't solve this perfectly, since I'm not an advance coder. It gives me all the time an instance error. Could you write an working sample script with ths both method to demonstrate it, when it would be possible?

          Thanks. Tom
          Give me some more details and I just might give you example code. What are you trying to draw on what panel? What is the trigger condition?

          Comment


            #6
            Hello Koganam

            I've written an example code using DrawOnPricePanel. It makes DrawRegion and DrawRectangle using the NT7 simple methods. The method referred to above I used graphics.FillRectangle. It can be found about more info: http://msdn.microsoft.com/en-us/library/c6ksfcek.aspx. It works very well in RValueCharts indicator, but I can't use it right.
            I attached the example code. Could you read through and figure out how it's working well?
            Thanks Tom
            Attached Files

            Comment


              #7
              Originally posted by marotom View Post
              Hello Koganam

              I've written an example code using DrawOnPricePanel. It makes DrawRegion and DrawRectangle using the NT7 simple methods. The method referred to above I used graphics.FillRectangle. It can be found about more info: http://msdn.microsoft.com/en-us/library/c6ksfcek.aspx. It works very well in RValueCharts indicator, but I can't use it right.
              I attached the example code. Could you read through and figure out how it's working well?
              Thanks Tom
              How do you want it to work. You talked about drawing on both the PricePanel, and the IndicatorPanel. What is to draw where?

              Comment


                #8
                Originally posted by koganam View Post
                How do you want it to work. You talked about drawing on both the PricePanel, and the IndicatorPanel. What is to draw where?
                In first step I'd like to use this other Graphics method correctly. When it works I can change the drawing between the both panel. Since, when I could use this method, it would not necessary to use the DrawOnPricePanel method, as can be seen in the referred indicator.
                I'd like to achieve to draw an FillRectange using this Graphics method that way as can be drawn using DrawRectangle/DrawRegion.
                Do you have some solutions?

                Comment


                  #9
                  Originally posted by marotom View Post
                  In first step I'd like to use this other Graphics method correctly. When it works I can change the drawing between the both panel. Since, when I could use this method, it would not necessary to use the DrawOnPricePanel method, as can be seen in the referred indicator.
                  I'd like to achieve to draw an FillRectange using this Graphics method that way as can be drawn using DrawRectangle/DrawRegion.
                  Do you have some solutions?
                  I am confused. Your original request seemed to be asking how to draw on both panels, Price and Indicator, using NT internal methods. Now you seem to be saying that what you want is to draw only on the Indicator Panel using native C# FillRectangle method?

                  Comment


                    #10
                    Originally posted by koganam View Post
                    I am confused. Your original request seemed to be asking how to draw on both panels, Price and Indicator, using NT internal methods. Now you seem to be saying that what you want is to draw only on the Indicator Panel using native C# FillRectangle method?
                    Oh yes, it is solved to draw on both panel, after your suggestion, using NT internal methods. And I'd like to achieve to draw the same things using native C# FillRectangle method too.So I need extra info to the right working of this method. Do you have?

                    Comment


                      #11
                      Originally posted by marotom View Post
                      Oh yes, it is solved to draw on both panel, after your suggestion, using NT internal methods. And I'd like to achieve to draw the same things using native C# FillRectangle method too.So I need extra info to the right working of this method. Do you have?
                      Now I think that I understand what you are asking, but then I have to ask you why you want to use FillRectange(), when the NT framework already provides that ability with DrawRectangle(), without having to jump through hoops? In the context of what you are doing, what does FillRectangle() do that DrawRectangle() does not? After all, DrawRectangle() is pretty much just a NT provided, objectified wrapper around the standard Rectangle drawing semantics of C#, precisely so that we do not need to worry about the internal implementation, and still be able to track our drawings by tag or name.

                      Comment


                        #12
                        Originally posted by marotom View Post
                        Hello NT support,
                        how can I draw using an indicator in price and indicator panel itself at once? I'd like to draw an rectange an indicator panel, and text, and other graphics on price panel. I found an method: DrawOnPricePanel = false; so I can only draw on indicator, but in this case can't avaible on the price panel . I'd like to use to Graphics.FillRectangle to draw on indicator, but there isn't enough information to right function.
                        How can I reach to draw on the both panel at once?

                        Thanks. Tom
                        I highly doubt that is possible without doing 2 separate indicators. But I'm sure someone else if they know how will chime in.

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by DanielTynera, Today, 01:14 AM
                        0 responses
                        2 views
                        0 likes
                        Last Post DanielTynera  
                        Started by yertle, 04-18-2024, 08:38 AM
                        9 responses
                        40 views
                        0 likes
                        Last Post yertle
                        by yertle
                         
                        Started by techgetgame, Yesterday, 11:42 PM
                        0 responses
                        12 views
                        0 likes
                        Last Post techgetgame  
                        Started by sephichapdson, Yesterday, 11:36 PM
                        0 responses
                        2 views
                        0 likes
                        Last Post sephichapdson  
                        Started by bortz, 11-06-2023, 08:04 AM
                        47 responses
                        1,615 views
                        0 likes
                        Last Post aligator  
                        Working...
                        X