• 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

How can I put a logo in NT charts?

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

    How can I put a logo in NT charts?

    Hello folks,

    I'd like to add a logo on the top-left section of NT charts (please, see image attached). I have a PNG image. Is there a tool in NT to place it directly or do I have to program it?

    Thanks for your help,
    luiscristhian97

    Click image for larger version

Name:	Company logo on NT.png
Views:	17
Size:	118.1 KB
ID:	1038587


    #2
    Hello luiscristhian97,
    Thanks for your post.

    There is currently no way to achieve this through the NinjaTrader UI. This can be done with some custom programming by using SharpDX and drawing an image within OnRender().

    Although created for bitmaps and not for PNG's, we do have sample code that you can reference for how to do this. I will attach the sample to my post. There is also a sample indicator named "SampleCustomRender" you can find inside the NinjaScript editor.

    Let me know if you have any questions.

    Attached Files
    Josh G.NinjaTrader Customer Service

    Comment


      #3
      Hello Josh,

      Thanks for your reply.

      I could set your SampleDrawBitmap file as an indicator in NT8. Then, I was trying to load my logo from a png file with SharpDX, but without success. Is there a way to do that in NinjaScript?

      Thanks again Josh

      Comment


        #4
        luiscristhian97,

        What specifically have you tried?
        Josh G.NinjaTrader Customer Service

        Comment


          #5
          Hello Josh,

          Here's the section of the code that I think can be the key of all of this.

          Code:
          public override void OnRenderTargetChanged()
                  {
                      myBitmap = LoadBitmapFromContentFile(System.IO.Path.Combine(NinjaTrader.Core.Globals.UserDataDir, "LOGO.png"));
                  }
          I was trying to get my LOGO.png into this path "LoadBitmapFromContentFile(System.IO.Path.Combine(N injaTrader.Core.Globals.UserDataDir, "LOGO.png"))", so it can show up when I activate the indicator on the chart.

          Went to Documents > NinjaTrader 8 > bin > Custom > Indicators and pasted my LOGO.png in that folder, but I think it's not as simple as that.

          Comment


            #6
            luiscristhian97,

            The "LOGO.png" file will not be inside the \Documents\NinjaTrader 8\bin\Custom\Indicators\ folder
            It would go directly inside the User Data Directory. ie. \Documents\NinjaTrader 8\
            Josh G.NinjaTrader Customer Service

            Comment


              #7
              Thank you Josh!

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by faisamtrader, Today, 10:31 AM
              1 response
              9 views
              0 likes
              Last Post NinjaTrader_Tyler  
              Started by ChazJ, Today, 09:48 AM
              1 response
              3 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by maxie, Today, 10:01 AM
              1 response
              6 views
              0 likes
              Last Post NinjaTrader_Melissa  
              Started by Bionian, Today, 09:36 AM
              1 response
              4 views
              0 likes
              Last Post NinjaTrader_PaulH  
              Started by tomd, Today, 09:48 AM
              1 response
              12 views
              0 likes
              Last Post NinjaTrader_Ariana  
              Working...
              X