Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

System.Drawing Reference Missing

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

    System.Drawing Reference Missing

    When converting several custom indicators I created under Ninjatrader 7 to Ninjatrader 8, I am trying to define the Using reference System.Drawing at the top of my script (see attached picture). However the Drawing reference does not show up under the System object.

    I am receiving the compiler error "The type or namespace StringFormat could not be found" which is defined under the System.Drawing object.

    I am running Ninjatrader 8 under OS Windows 10. I am able to see the .Net 4.6 System.Drawing object under MS Visual Studio object browser so I know its there. Plus I am able to see the System.Drawing reference object when I run Ninjatrader 7 - just not under Ninjatrader 8.

    Any ideas?
    Attached Files

    #2
    Hello dsh2687,

    Thank you for writing in. NinjaTrader 8 uses System.Windows.Media instead of System.Drawing so System.Drawing is not included by default. To add a reference to the System.Drawing namespace so it can be used please follow the steps below:

    Create a new NinjaScript Editor.
    Open a file and right click in the editor.
    Choose "References...".
    Click "add".
    Browse to the .Net assemblies folder (should be %windowsdir%\Microsoft.NET\Framework\v4.0.30319 or something similar).
    Select "System.Drawing" and click add.

    This will add in the System.Drawing.dll to the references for NinjaTrader.Custom.dll so you can add a using declaration.

    Please let me know if this does not resolve the issue or if I may be of further assistance.
    Michael M.NinjaTrader Quality Assurance

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by mgco4you, Today, 09:46 PM
    1 response
    2 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by wzgy0920, Today, 09:53 PM
    0 responses
    3 views
    0 likes
    Last Post wzgy0920  
    Started by Rapine Heihei, Today, 08:19 PM
    1 response
    8 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by Rapine Heihei, Today, 08:25 PM
    0 responses
    6 views
    0 likes
    Last Post Rapine Heihei  
    Started by f.saeidi, Today, 08:01 PM
    1 response
    9 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Working...
    X