Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Draw.Text Issues NT7 B8

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

    Draw.Text Issues NT7 B8

    Draw.Text() does not work on the indicator panel.

    The text is not printed.

    I have added an indicator on a second panel below the price panel and used DrawText() from within this indicator.

    -> with DrawOnPricePanel = true, the text is printed on the price panel
    -> with DrawOnPricePanel = false, nothing is printed on the indicator panel

    Draw.TextFixed() works on the indicator panel.

    Now it gets more interesting...

    When I use both Draw.Text() and Draw.TextFixed() within the same indicator on the price panel, the first script command will be executed. The second will be ignored.

    First case:

    Code:
    Draw.Text();
    Draw.TextFixed();
    The text from Draw.Text() is visible on the price panel. Draw.TextFixed() will not work.

    Second case:

    Code:
    Draw.TextFixed();
    Draw.Text();
    The text from Draw.TextFixed() is visible on the price panel. Draw.Text() is now ignored.


    Selecting price panel or indicator panel via overload:

    Some of the the other Draw() methods allow for selecting the panel via overload. It would be good to have this option for Draw.Text as well. Currently, it is necessary to switch between price panel and indicator panel by setting DrawOnPricePanel to "true" or to "false".

    #2
    Hello Harry,

    Where are you drawing on the indicator panel?

    Do you have autoscale set to true for the text you are drawing?
    Draw.Text(this, "Text" + CurrentBar, true, "Text", 0, Low[0] - 4 * TickSize, 0, Brushes.Black, new NinjaTrader.Gui.Tools.SimpleFont("Arial", 12), TextAlignment.Center, Brushes.Transparent, Brushes.White, 100);

    I am seeing that there is an issue with the autoscale and drawn text objects.
    By setting the Autoscale to true, I was able to see the text on the second panel when DrawOnPricePanel is set to false as long as I am disconnected from all data providers and the chart isn't being re-rendered. However, when I started scrolling, I found that the autoscale loses the drawn objects when the chart is scrolled.

    So basically, the objects are being drawn, but the autoscale is not able to keep these in view when the chart is rendered.

    I've made a video of this and I will be submitting this to our development department.
    Free online storage and sharing with Screencast.com. 2 GB of storage and 2 GB of bandwidth per month for free. We won't compress, alter or take ownership of your content.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_ChelseaB View Post
      Hello Harry,

      Where are you drawing on the indicator panel?

      Do you have autoscale set to true for the text you are drawing?
      Draw.Text(this, "Text" + CurrentBar, true, "Text", 0, Low[0] - 4 * TickSize, 0, Brushes.Black, new NinjaTrader.Gui.Tools.SimpleFont("Arial", 12), TextAlignment.Center, Brushes.Transparent, Brushes.White, 100);

      I am seeing that there is an issue with the autoscale and drawn text objects.
      By setting the Autoscale to true, I was able to see the text on the second panel when DrawOnPricePanel is set to false as long as I am disconnected from all data providers and the chart isn't being re-rendered. However, when I started scrolling, I found that the autoscale loses the drawn objects when the chart is scrolled.

      So basically, the objects are being drawn, but the autoscale is not able to keep these in view when the chart is rendered.

      I've made a video of this and I will be submitting this to our development department.
      http://screencast.com/t/GkOLapDpHpQA
      Yesterday, I had used the simplest overload of Draw.Text to draw the text for the current bar (barsAgo = 0) at the indicator level (y = Value[0]), and nothing was drawn. Today, the same indicator plots the text as expected.

      I did not use any overload that has an Autoscale parameter. Not sure what had caused the problem.

      Comment


        #4
        Hello Harry,

        If you are able to reproduce the issue, please take a screenshot of the chart and take a screenshot of the Drawing Objects window showing the last added text object so that I can see the y value.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Hello Harry,

          I wanted to update you about NTEIGHT-9177 where drawing objects lose auto scale when chart is moved.

          Development has marked this item as fixed with NinjaTrader 8 Beta 8.

          Please update to the latest version of the platform and re-test for the behavior.

          http://ninjatrader.com/PlatformDirect
          Chelsea B.NinjaTrader Customer Service

          Comment


            #6
            DrawText bug not solved with NT 8 B12

            Discovered a bug with DrawText as objects are not placed properly.

            When I place a DrawText object 1 point above the high and another one 1 point below the low of a bar, they are not at equal distance from the price bars. I know that this can happen as far as the font size is not exceeded. However, if you look at the three charts attached below, you will notice that after horizontal compression of a chart

            - the red triangles are moving below the high (although the formula applied is High[0] + 1 point)
            - the green triangles are moving several points below the low of the bar (although the formula applied is Low[0] - 1 point)

            It is not possible to draw text at a defined distance from the price bar, as it is moving all over the place.
            Attached Files

            Comment


              #7
              Hello Harry,

              There are drawing objects where there are no data bars. Are you specifying a date or bar number of a bar other than the current bar?
              (How are these items drawn ahead of the data on the chart?)


              Are you using Draw.Text() with a special character?
              Or are you using Draw.TriangleUp() and Draw.TriangleDown()?

              Looking at the chart, we can see that the green object with an arrow is not drawn at 2179,00 which would be 1 point below the low of that bar.

              However, it doesn't look like the drawing objects are lining up with the bar they are triggered from. This would indicate the objects are not being drawn on the current bar.

              That said, I am not able to reproduce this behavior.
              Below is a link to a video I have created while testing for this bug.
              Free online storage and sharing with Screencast.com. 2 GB of storage and 2 GB of bandwidth per month for free. We won't compress, alter or take ownership of your content.


              Attached is an export with two indicators I have made to test this theory. One script uses Draw.Text with a special character (DrawTextYPlacementTest), the other uses Draw.TriangleUp() and Draw.TriangleDown() (DrawTriangleYPlacementTest).

              Please test these on your end and let me know if you are able to reproduce using these scripts.
              Attached Files
              Chelsea B.NinjaTrader Customer Service

              Comment


                #8
                Hello Chelsea,

                I guess I wasted your time. It was a stupid copy and paste error which I did not discover, because I was tired. Please close the ticket.

                Yes, I used DrawText() with a special character.

                The problem is that DrawTriangleUp() and DrawTriangleDown() are not scalable. The symbols are simply too small for elderly users and cannot be used. Therefore DrawText is the only possible solution. But no priority here, as a solution is available.

                Thank you again for your help.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Brevo, Today, 01:45 AM
                0 responses
                3 views
                0 likes
                Last Post Brevo
                by Brevo
                 
                Started by aussugardefender, Today, 01:07 AM
                0 responses
                3 views
                0 likes
                Last Post aussugardefender  
                Started by pvincent, 06-23-2022, 12:53 PM
                14 responses
                240 views
                0 likes
                Last Post Nyman
                by Nyman
                 
                Started by TraderG23, 12-08-2023, 07:56 AM
                9 responses
                384 views
                1 like
                Last Post Gavini
                by Gavini
                 
                Started by oviejo, Today, 12:28 AM
                0 responses
                6 views
                0 likes
                Last Post oviejo
                by oviejo
                 
                Working...
                X