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

Drawing a single dot in indicator panel

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

    Drawing a single dot in indicator panel

    I want to draw a single dot & text in the MACD indicator panel when a condition is met. I have modified my own MACD, and tried using the DrawDot function, but that draws the dot on the price panel.
    Can this only be done by adding another Add(new Plot... function?
    Can you please point me in the right direction on how to do this?

    Thank you.

    UPDATE TO QUESTION: i figured out how to draw a single dot on the indicator panel. Now I would like to know how to draw text on the indicator panel(below the dot). Thanks.
    Last edited by zacharydw00; 07-21-2009, 02:05 PM.

    #2
    Hi Zac, I know I've seen the code somewhere. Give me a few minutes and I'll find it.
    AustinNinjaTrader Customer Service

    Comment


      #3
      The property you're looking for is DrawOnPricePanel. Here is a link that will take you to the help guide reference for DrawOnPricePanel.
      AustinNinjaTrader Customer Service

      Comment


        #4
        I figured out how to draw a single dot in the indicator panel. Now I would like to know how to draw text in the indicator panel(below the dot). The DrawText function does not seem to work.
        Thanks.
        Last edited by zacharydw00; 07-21-2009, 02:18 PM.

        Comment


          #5
          Originally posted by zacharydw00 View Post
          I figured out how to draw a single dot on the indicator panel. Now I would like to know how to draw text on the indicator panel(below the dot). Thanks.
          Zac, setting DrawOnPricePanel = false should force all Draw objects onto the indicator panel. I edited the MACD indicator a little to help me help you. You can see that it draws text and dots in the indicator window. I've also attached the indicator that I created so you can see what works--the relevant section is from line 77 to line 91.
          Attached Files
          AustinNinjaTrader Customer Service

          Comment


            #6
            Maybe it's something on my end. A global setting or something. When I load your macd2, no text shows up in the indicator panel, but the dots do. I copied the drawtext line from your macd2 into my macd, but the text did not print. I uploaded my macd for you to verify.
            Thanks.
            Last edited by zacharydw00; 10-01-2009, 11:02 PM.

            Comment


              #7
              The version you posted is a little complicated for debugging purposes, so we'll use mine to find out why the text isn't being drawn.

              I'll outline a few steps for you to try so we can pin this down:
              1. Start Ninjatrader and close any open workspaces (or just make sure you're starting from a blank slate).
              2. Open a new chart with <None> for the chart template.
              3. Open the indicator window and add only macd2
              4. Is the text plotted on top of the dots?
              AustinNinjaTrader Customer Service

              Comment


                #8
                For some reason restarting Ninja fixed the text problem this time. I did restart Ninja last time, but it did fix the text problem.
                Well thanks... it's all working now.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by andrewtrades, Today, 04:57 PM
                1 response
                9 views
                0 likes
                Last Post NinjaTrader_Manfred  
                Started by chbruno, Today, 04:10 PM
                0 responses
                6 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
                8 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