Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Adding Graphic Image to Chart

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

    Adding Graphic Image to Chart

    Hey there.

    I'd like to add a graphic watermark on my charts. I have a PNG, is there any way to add this? Or a way to generate the SharpDX vectors to render it?

    Thank you

    Kevin

    #2
    Hello reach4thelasers,

    Thanks for opening the thread.

    This can be done using SharpDX and drawing an image within OnRender().

    Although created for bitmaps and not PNG's, we do have sample code that you can reference for how to do this. I will attach the sample to my post.

    Please let me know if I may be of further assistance.
    Attached Files
    Last edited by NinjaTrader_Jim; 11-12-2018, 08:47 AM.

    Comment


      #3
      Hi Jim,

      I know it's been just over two years!

      How would you go about converting the image to grayscale? I tried changing PixelFormat but SharpDX was giving me a formatting error. I had a look over at SOF and read SharpDx will not render Grayscale (8dpp ??), but instead I have to use a shader. Any help on that would be great.
      I am currently making a 2D application using SharpDX.Direct2D1. Here is my setup for my 2D deviceContext that works correctly. m_swapchaindesc = New SwapChainDescription() With m_swapchainde...

      Comment


        #4
        Hello sim22,

        This would be more of a general C# concept than NinjaScript related and beyond the complexity of what we can support.

        I would suggest you continue to search the sites you've linked to for the answer.

        Please let us know if you need a third party to assist you with this.

        Alan P.NinjaTrader Customer Service

        Comment


          #5
          Thank you. Don't expect much and you won't be disappointed.

          Comment


            #6
            Hello Sim22,

            I was able to find the following with a simple web search,
            Is there a way to convert an image to grayscale 16 bits per pixel format, rather than setting each of the r, g and b components to luminance. I currently have a bmp from file. Bitmap c = new Bitmap...


            Please let us know if you need further assistance.
            Alan P.NinjaTrader Customer Service

            Comment


              #7
              is that available for NT7?

              Comment


                #8
                Hello TazoTadoa,

                We don't have an example for drawing bitmaps in NinjaTrader 7 and we do not offer support for using System.Drawing or the Plot method which would be the parallel to NinjaTrader 8's OnRender().

                A client previously was asking about drawing bitmaps in NinjaTrader 8 in reference to a script that already does this for NinjaTrader 7. Their attached script may help you out further, so I'll include a link below.

                https://ninjatrader.com/support/foru...cyback-for-nt8

                Please let us know if you have any additional questions.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                608 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                355 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                105 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                560 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                561 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X