• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

DrawText Coding Error -- please help!

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

    DrawText Coding Error -- please help!

    Can anyone please tell me how to fix this code:

    Code:
    // draw retracement retracement text
    				DrawText(this._strWave2RetracementLinesTag + "RLBL" + index.ToString(), 
    					false, 
    					String.Format("{0:F2}", this._doubleRetracementLevels[index] * 100) + "%", 
    					intEndBarVL + 4, 
    					doubleY + this._doublePointOffset / 5, 
    					this._colorRetracementText[index], 
    					new Font(FontFamily.GenericSansSerif, this._intRetracementFontSize[index], this._fsRetracementText, GraphicsUnit.Pixel), 
    					StringAlignment.Center,
    					Color.Transparent,
    					Color.Transparent,
    					0);
    The error message says:

    No overload for method 'Draw Text' takes 11 arguments

    #2
    Hello lovemyipad,

    Thank you for your post.

    You are missing a overload for the DrawText() method which can be referenced from the link below -
    http://www.ninjatrader.com/support/h...l?drawtext.htm
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Cal View Post
      Hello lovemyipad,

      Thank you for your post.

      You are missing a overload for the DrawText() method which can be referenced from the link below -
      http://www.ninjatrader.com/support/h...l?drawtext.htm
      Hi, thanks so much, but I must confess you're giving me way too much credit! I have already read everything in the help manual, including the site you reference. I don't write code, so I don't know how to make/identify an overload, or where to put it. (I was so impressed with myself that I could even figure out how to find the problem in the code using F5!)

      This is an indicator that was written for an outdated version of Ninja Trader, and I would like to update it so it works with my version 7. But I know nothing about coding. I just push all the buttons until it works, or I break it.

      Is there any coder out there who can please, PLEASE help me???

      Comment


        #4
        lovemyipad,

        Can you possible share the indicator here so that I can review this on my end and get the correct format set for you?

        You can attach the indicator by clicking Reply -> Go Advanced -> Paperclip icon on the toolbar.

        The indicator will be located in (My) Documents -> NinjaTrader 7 -> bin -> Custom -> Indicator
        Cal H.NinjaTrader Customer Service

        Comment


          #5
          Cal, thanks so much for your reply -- especially for the detailed instructions on how to reply to your reply.
          Attached Files

          Comment


            #6
            Hello lovemyipad,

            Thank you for your response.

            The DrawText() was missing the y pixelOffset, please add the '0,' to the three DrawText methods as seen below:
            Code:
            			DrawText(wavehelper.******Tag, 
            				false, // autoscale
            				wavehelper.******Name, // text
            				this.CurrentBar - wavehelper.******Bar, // bars ago
            				(this.WaveType == ******Type.UpWave ? wavehelper.******Low - this._doublePointOffset : wavehelper.******High + this._doublePointOffset), 
            				0,
            				this._colorWaveText[wavehelper.TDIndex], 
            				new Font(FontFamily.GenericSansSerif, this._intWaveTextFontSize[wavehelper.TDIndex], this._fsWaveText[wavehelper.TDIndex], GraphicsUnit.Pixel), 
            				StringAlignment.Center,
            				Color.Transparent,
            				Color.Transparent,
            				0);
            Patrick H.NinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_PatrickH View Post
              Hello lovemyipad,

              Thank you for your response.

              The DrawText() was missing the y pixelOffset, please add the '0,' to the three DrawText methods as seen below:
              Patrick --

              It worked! It worked! It worked!

              Thank you! Thank you! Thank you!

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by escobar63, Yesterday, 05:06 PM
              1 response
              11 views
              0 likes
              Last Post NinjaTrader_PaulH  
              Started by Brutus, Today, 06:00 AM
              1 response
              4 views
              0 likes
              Last Post NinjaTrader_PatrickG  
              Started by phesi, Today, 03:36 AM
              2 responses
              8 views
              0 likes
              Last Post phesi
              by phesi
               
              Started by Guru73, Today, 01:35 AM
              1 response
              9 views
              0 likes
              Last Post NinjaTrader_Marco  
              Started by Maxwell123, Today, 12:34 AM
              1 response
              11 views
              0 likes
              Last Post NinjaTrader_ChrisSch  
              Working...
              X