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

Draw.Text produced black text only.

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

    Draw.Text produced black text only.

    Hello.
    This line draw text with black color only.
    What am I doing wrong?
    PHP Code:
    Draw.TextthisCurrentBar +"_lo_not_palced "+ask
    trues0price_level50
    Brushes.DarkRed
    new 
    NinjaTrader.Gui.Tools.SimpleFont(), 
    TextAlignment.Rightnullnull); 
    Attached Files
    Last edited by fx.practic; 10-07-2017, 02:02 PM.
    fx.practic
    NinjaTrader Ecosystem Vendor - fx.practic

    #2
    Originally posted by fx.practic View Post
    Hello.
    This line draw text with black color only.
    What am I doing wrong?
    PHP Code:
    Draw.TextthisCurrentBar +"_lo_not_palced "+ask
    trues0price_level50
    Brushes.DarkRed
    new 
    NinjaTrader.Gui.Tools.SimpleFont(), 
    TextAlignment.Rightnullnull); 
    Try looking at this example.

    RJay
    NinjaTrader Ecosystem Vendor - Innovative Trading Solutions

    Comment


      #3
      I tried more than one variant of creating font and text brush. And other brushes.

      PHP Code:
      NinjaTrader.Gui.Tools.SimpleFont myFont 
      new 
      NinjaTrader.Gui.Tools.SimpleFont("Courier New"12) { Size 50Bold true };

      Draw.TextthisCurrentBar +"_lo_not_palced "+asktrues0,
      Sit_Long.Order_Price_Counted50
      Brushes.DarkRedmyFontTextAlignment.Rightnullnull); 
      Attached Files
      fx.practic
      NinjaTrader Ecosystem Vendor - fx.practic

      Comment


        #4
        May I use this post to ask you something?
        If I wanna use Draw.Text and "plot" for example the number 4 (calculated), and in the next tick CHANGE the value, is there any possibility?

        Thanks!

        Comment


          #5
          General problem

          This seems to be a general breaking problem in 8.0.9.0. All my indicators that worked perfectly in the previous version now comes up by default with all colors set to black, even though custom colors have been chosen and saved in a template.

          Once again, this worked perfectly in the previous version.

          Comment


            #6
            Hello fx.practic,

            Originally posted by fx.practic View Post
            Hello.
            This line draw text with black color only.
            What am I doing wrong?
            PHP Code:
            Draw.TextthisCurrentBar +"_lo_not_palced "+ask
            trues0price_level50
            Brushes.DarkRed
            new 
            NinjaTrader.Gui.Tools.SimpleFont(), 
            TextAlignment.Rightnullnull); 
            I am not able to reproduce this behavior.

            Below is a link to a video I have recorded to demonstrate.
            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 the script tested. If you test on your end and view the color of the Some Text in the Drawing Objects window are you showing this as being set to black?


            yamzeq,

            Originally posted by yamzeq View Post
            May I use this post to ask you something?
            If I wanna use Draw.Text and "plot" for example the number 4 (calculated), and in the next tick CHANGE the value, is there any possibility?

            Thanks!
            When the object is redrawn using the same tag, then the new values will take affect using the new supplied variables. If you are using a new unique tags, this will draw new objects using the new values but will not modify any other unspecified objects.

            Below is a publicly available link to the help guide on Draw.Text().



            JohnSteinberg,

            Originally posted by JohnSteinberg View Post
            This seems to be a general breaking problem in 8.0.9.0. All my indicators that worked perfectly in the previous version now comes up by default with all colors set to black, even though custom colors have been chosen and saved in a template.

            Once again, this worked perfectly in the previous version.
            Is this an open source script?
            Or is this an exported dll using a template?
            Do you have a reduced script that can demonstrate the behavior you can export and attach to your next post?
            Attached Files
            Last edited by NinjaTrader_ChelseaB; 10-08-2017, 12:27 PM.
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              ChelseaB, I'm sorry, but I don't see any text on chart in Your video.

              Also, I tried Your script at my end. Text is black. Here is video: https://www.screencast.com/t/niO6hWVQh
              fx.practic
              NinjaTrader Ecosystem Vendor - fx.practic

              Comment


                #8
                Hello fx.practic,

                I'm running on some slow hardware today. My video skipped the part where it gets added to the chart and doesn't show me clicking on this and selecting properties.

                I remade the video moving a little slower.

                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.


                Do you a Default template saved for the Text Drawing object?
                Chelsea B.NinjaTrader Customer Service

                Comment


                  #9
                  I do nothing with templates.
                  I didn't, even, think about it. Should I try something with templates?
                  fx.practic
                  NinjaTrader Ecosystem Vendor - fx.practic

                  Comment


                    #10
                    Hello fx.practic,

                    As long as you have opened up the templates window and confirmed there is no template named Default, and you are using 8.0.9.0 I would like to schedule a call with you to observe this behavior during our normal support hours.

                    Please send an email to platformsupport [at] ninjatrader [dot] com. In the email, please include a link to this forum thread.
                    Chelsea B.NinjaTrader Customer Service

                    Comment


                      #11
                      Hello, Chelsea.

                      I found Default template for Text IDrawingTool, remove it, and text become colourized, yes. Thank You.
                      But, what about users on other systems? What if they need their text templates?
                      fx.practic
                      NinjaTrader Ecosystem Vendor - fx.practic

                      Comment


                        #12
                        Hello fx.practic,

                        This confirms that you have saved a Default template for this drawing object.

                        If the user has saved a default template, then that default template will always be applied when no template is specified.

                        This is true with manually drawn objects, this is true with code drawn objects.

                        The user will need to remove the Default template if they do not want a Default template.

                        Or you can supply a template and specify that template in your script.
                        Chelsea B.NinjaTrader Customer Service

                        Comment


                          #13
                          Hi Chelsea,

                          Apologies for the late reply. Must just apologize to the OP for hijacking this thread too, should have started a separate thread. Apologies @fx.practic.

                          Attached is a simple indicator that draws a price line and tick counter with normal and low color fonts. You will see when you add the indicator to a tick chart everything works as it should. If you save a template and try and load the template on a new chart again, everything is basically set to 'colorless'. I tested this indicator unedited on both version 8.0.9.0 and previous versions and the above behavior only happens in version 8.0.9.0.

                          Thanks for any assistance you can give to solve this.

                          Regards,
                          John
                          Attached Files

                          Comment


                            #14
                            Hello John,

                            To confirm, you are saving a default template, and the colors saved in the template are not loading correctly when the drawing object is drawn from a script, but is loading correctly when drawn manually, is this correct?
                            Chelsea B.NinjaTrader Customer Service

                            Comment


                              #15
                              Originally posted by NinjaTrader_ChelseaB View Post
                              Hello fx.practic,

                              This confirms that you have saved a Default template for this drawing object.

                              If the user has saved a default template, then that default template will always be applied when no template is specified.

                              This is true with manually drawn objects, this is true with code drawn objects.

                              The user will need to remove the Default template if they do not want a Default template.

                              Or you can supply a template and specify that template in your script.


                              I still can't believe this is true.

                              I requesting removing any dependencies between programmatically created Draw objects and any user-created templates.

                              Of course, except draw methods overloads with template in parameters.
                              fx.practic
                              NinjaTrader Ecosystem Vendor - fx.practic

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by kulwinder73, Today, 10:31 AM
                              1 response
                              8 views
                              0 likes
                              Last Post NinjaTrader_Erick  
                              Started by RookieTrader, Today, 09:37 AM
                              3 responses
                              15 views
                              0 likes
                              Last Post NinjaTrader_ChelseaB  
                              Started by terofs, Yesterday, 04:18 PM
                              1 response
                              24 views
                              0 likes
                              Last Post terofs
                              by terofs
                               
                              Started by CommonWhale, Today, 09:55 AM
                              1 response
                              6 views
                              0 likes
                              Last Post NinjaTrader_Erick  
                              Started by Gerik, Today, 09:40 AM
                              2 responses
                              8 views
                              0 likes
                              Last Post Gerik
                              by Gerik
                               
                              Working...
                              X