Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Draw Text overloads

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

    Draw Text overloads

    Hello,Support and All!

    Always have difficulties to understand some the parameters in overload in drawing commands.

    Could anyone please suggest what the "5" stands for in this overload?

    DrawText("Triangle_Up" + CurrentBar, true, triangleStringUp, 0, Low[0] - offset, 5, triangleUpColor, triangleFont, StringAlignment.Center, Color.Transparent, Color.Transparent, 0);

    It seems that it doesn`t really matter if it`s 5 or 0, or 4154254 - nothing changes.

    Also,is there any good tutorial to better understand it?NT help guide doesn`t click with me.

    Thanks!

    #2
    https://ninjatrader.com/support/help.../?drawtext.htm

    DrawText(string tag, bool autoScale, string text, DateTime time, double y, int yPixelOffset, Color textColor, Font font, StringAlignment alignment, Color outlineColor, Color areaColor, int areaOpacity)

    yPixelOffset
    The offset value in pixels from within the text box area

    Try using an outlineColor other than transparent, then change the value ?

    Comment


      #3
      Originally posted by sledge View Post
      https://ninjatrader.com/support/help.../?drawtext.htm

      DrawText(string tag, bool autoScale, string text, DateTime time, double y, int yPixelOffset, Color textColor, Font font, StringAlignment alignment, Color outlineColor, Color areaColor, int areaOpacity)

      yPixelOffset
      The offset value in pixels from within the text box area

      Try using an outlineColor other than transparent, then change the value ?
      But there`s no parameter for the text box there?

      Comment


        #4
        Sledge,help me to understand the overloads better,i`d give you my Nintendo.I could only programming in Basic in my Atari when i was 13

        Comment


          #5
          Originally posted by outsource View Post
          But there`s no parameter for the text box there?
          I haven't tried it - my only base my assumption on a Text item you can draw, you can give it a box and a color through the app.

          I figured Outline Color is this part of the box around the text.

          In a chart - go to Draw Text and look up properties, you can put a box and color inside the box and set the opacity.

          If you set these colors other than transparent - you'd see them. I'm guessing the offset would shift the box area. Your not seeing this because you don't see the box.

          Comment


            #6
            The offset will shift the text, box and fill together by the offset pixels. This is more useful than using ticks from price because a tick will be large or small depending on chart and candle proportions due to auto scaling. An offset in ticks remains constant no matter what.
            eDanny
            NinjaTrader Ecosystem Vendor - Integrity Traders

            Comment


              #7
              Originally posted by eDanny View Post
              The offset will shift the text, box and fill together by the offset pixels. This is more useful than using ticks from price because a tick will be large or small depending on chart and candle proportions due to auto scaling. An offset in ticks remains constant no matter what.
              How then the text offset and pixeloffset will work together in my overload?

              Comment


                #8
                They can still work together. If you add ticks to the High/Low of bars and then also use a pixel offset it uses both.
                eDanny
                NinjaTrader Ecosystem Vendor - Integrity Traders

                Comment


                  #9
                  Originally posted by eDanny View Post
                  They can still work together. If you add ticks to the High/Low of bars and then also use a pixel offset it uses both.
                  Ok,but pixels a bit different in size then ticks,right.How many pixels is equal to 1 Tick?Is there a conflict between the two?

                  Comment


                    #10
                    Originally posted by outsource View Post
                    Ok,but pixels a bit different in size then ticks,right.How many pixels is equal to 1 Tick?Is there a conflict between the two?
                    Pixels are fixed absolute units depending on the monitor resolution. They have nothing to do with the tick size, which is a property of a trading instrument.

                    Comment


                      #11
                      Originally posted by koganam View Post
                      Pixels are fixed absolute units depending on the monitor resolution. They have nothing to do with the tick size, which is a property of a trading instrument.
                      And the purpose of this option then?For a better visual sensing?

                      Comment


                        #12
                        Originally posted by outsource View Post
                        And the purpose of this option then?For a better visual sensing?
                        yPixelOffset gives you exact placement, because pixels are fixed. e.g., 10 pixels from the low of a bar, will always be exactly 10 pixels away, regardless of anything else that happens to the bar, or how the chart is scaled. In other words, by using a pixel offset, you absolutely fix the location relative to the bar and the chart. You get consistency of placement.

                        ref: http://ninjatrader.com/support/forum...ad.php?t=30314
                        Last edited by koganam; 10-13-2016, 10:29 AM. Reason: Corrected spelling.

                        Comment


                          #13
                          I'm curious to know how the pixel offset looks on a 4K monitor compared to an HD screen (same offset on each). How does NT handle it, does it use actual screen pixels or some kind of pixel calculation within the chart area?
                          eDanny
                          NinjaTrader Ecosystem Vendor - Integrity Traders

                          Comment


                            #14
                            Originally posted by koganam View Post
                            yPixelOffset gives you exact placement, because pixels are fixed. e.g., 10 pixels from the low of a bar, will always be exactly 10 pixels away, regardless of anything else that happens to the bar, or how the chart is scaled. In other words, by using a pixel offset, you absolutely fix the location relative to the bar and the chart. You get consistency of placement.

                            ref: http://ninjatrader.com/support/forum...ad.php?t=30314
                            If i already have the offset property off the High and Low,how do i make yPixelOffset as a property?

                            Comment


                              #15
                              If you set the offset to High[0] + 2*Ticksize and the pixel offset to 10 your text would be 2 ticks above the high plus an additional 10 pixels. If the pixel offset was -10 your text would be + 2 ticks - 10 pixels.
                              eDanny
                              NinjaTrader Ecosystem Vendor - Integrity Traders

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by peregrine, Today, 05:49 PM
                              0 responses
                              3 views
                              0 likes
                              Last Post peregrine  
                              Started by JamesBond, Today, 04:22 PM
                              0 responses
                              10 views
                              0 likes
                              Last Post JamesBond  
                              Started by Parmenides48, Today, 03:29 PM
                              0 responses
                              20 views
                              0 likes
                              Last Post Parmenides48  
                              Started by ezrollin, Today, 03:09 PM
                              1 response
                              13 views
                              0 likes
                              Last Post ezrollin  
                              Started by JamesBond, Today, 01:38 PM
                              2 responses
                              23 views
                              0 likes
                              Last Post JamesBond  
                              Working...
                              X