Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Suggestion: Add System.Drawing refrence in NT Editor

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

    Suggestion: Add System.Drawing refrence in NT Editor

    Many things use System.Drawing.
    we get this message often, however when i deliver scripts to others, they are unable to use it (they dont want to manually import the dll and create references manually):

    i think it's good that NT had included that automatically, so in scripts we could simply use:

    System.Drawing.....

    are there any drawbacks if it gets auto-included in nt?

    i read this : https://ninjatrader.com/support/foru...ad.php?t=80495

    but cant still set i.e background color of a Form.

    form1.BackColor

    without system.drawing reference.

    #2
    Hello TazoTodua,

    Thanks for your suggestion.

    NinjaTrader 8 uses SharpDX for custom rendering when NinjaTrader 7 used GDI+ graphics. Our SampleCustomRender indicator can be used for reference as well as our drawing tools for various SharpDX OnRender() implementations. I've also included some resources for understanding the best practices when using SharpDX with NinjaTrader 8.

    SharpDX Custom Rendering - https://ninjatrader.com/support/help..._rendering.htm

    I have also opened a feature request to track interest in adding support for using GDI+ graphics with NinjaTrader 8. The ticket ID is SFT-3473. We cannot offer an ETA or promise of fulfillment, but we are tracking interest and the ticket ID number will be noted in the help guide when a new build gets released with the feature implemented.

    Release Notes - https://ninjatrader.com/support/help...ease_notes.htm

    Thanks again for taking the time to post!
    JimNinjaTrader Customer Service

    Comment


      #3
      Jim many thanks!

      one question (i wanted an answer to that).

      I was unable to set the background colors of simple c# form.
      it asks me for reference to system.drawing.

      it is a bit pitty, that NT needs to have extra burder (to make reference to that file, and also, ask all other users/clients of your indicator, to do that manually) is an extra burden, to have the simple functionalty (liek setting background color for forms/elements), because standard C# controls, require `Color` as i see, and dont accept other kind of "colors".

      so, we cant do that in NT without referencing System.Drawing? that's why we need help.

      Comment


        #4
        Hello TazoTodua,

        NinjaTrader 8 windows use WPF while charting uses SharpDX. We do not support GDI+ graphics with NinjaTrader 8 and would not be able to provide direction for using System.Drawing.

        The documentation and example below can introduce you to building NinjaTrader windows and using NinjaTrader controls.

        AddOn Overview - https://ninjatrader.com/support/help...t_overview.htm

        If you have a specific question on what you are trying to accomplish, we may have an example or we could point you in the right direction.

        We look forward to being of further assistance.
        JimNinjaTrader Customer Service

        Comment


          #5
          I know it's old topic, but i have the same need, and couldnt find an answer easily.
          is there any way that i could set the background color of "Form" element?
          it asks for System.Drawing.Dll reference only for BackColor property.
          all others are going fine, just backcolor requires that and I want to avoid refenrences to System.Drawing.dll

          Comment


            #6
            Hello TazoTodua,

            BackColor would be used in NT7 when BackBrush would be used in NT8. We would assign a Windows.Media.Brush instead of using System.Drawing.Color.

            BackBrush - https://ninjatrader.com/support/help...?backbrush.htm

            Please let me know if you have any additional questions.
            JimNinjaTrader Customer Service

            Comment


              #7
              but "System.Windows.Forms.Form" element does have "BackColor" property, not BackBrush

              Comment


                #8
                Hello TazoTodua,

                Thanks for clarifying.

                WPF would be the supported window framework to use with NinjaTrader 8. When working with WinForms and GDI+ graphics, you would need to add references for the DLL's required by the code you are using.

                Please let me know if you have any questions.
                JimNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by KennyK, 05-29-2017, 02:02 AM
                2 responses
                1,278 views
                0 likes
                Last Post marcus2300  
                Started by fernandobr, Today, 09:11 AM
                0 responses
                0 views
                0 likes
                Last Post fernandobr  
                Started by itrader46, Today, 09:04 AM
                1 response
                3 views
                0 likes
                Last Post NinjaTrader_Clayton  
                Started by timmbbo, Today, 08:59 AM
                0 responses
                2 views
                0 likes
                Last Post timmbbo
                by timmbbo
                 
                Started by bmartz, 03-12-2024, 06:12 AM
                5 responses
                33 views
                0 likes
                Last Post NinjaTrader_Zachary  
                Working...
                X