- Intellisense in the NinjaScript editor does not show Drawing under System -- but Intellisense in Visual Studio does show it. (Why are the two different?)
- Intellsense in Visual Studio also shows System.Drawing.PointF.
- Adding a "using System.Drawing" line compiles, but does not solve the problem -- PointF is still not found.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
PointF and Intellisense question
Collapse
X
-
PointF and Intellisense question
I'm having trouble dealing with PointF. I get the compiler error:
PointF is in System.Drawing, but knowing that does not seem to help me.The type or namespace name 'PointF' could not be found (are you missing a using directive or an assembly reference?)Tags: None
-
Similar problem -- the Pen class. The code I am porting calls Pen.Dispose(). System.Windows.Media.Pen has no Dispose() method, so I presume I should use System.Drawing.Pen. That exists and has a Dispose() method, according to both Microsoft documentation and Visual Studio intellisense. However, when I explicitly qualify Pen as System.Drawing.Pen the NinjaScript compiler says Pen does not exist in the System.Drawing namespace.
I tried one obvious thing -- closing NinjaTrader and then restarting it. Same problem.
Question: what Pen should I be using?
Why does the NinjaScript system disagree with Microsoft on System.Drawing and its contents?
Am I, perhaps, running into .NET versioning issues? I doubt that because Visual Studio and the NinjaScript editor should agree and they do not agree.
-
I think the answer is that I need to get caught up -- System.Drawing is not used by NT8. I need to convert my code to SharpDX.
I still do not understand why the NinjaScript editor and Visual Studio Intellisense do not agree, though.
Comment
-
Hello ETFVoyageur,
Thank you for your post.
Correct, NinjaTrader 8 uses System.Windows.Media instead of System.Drawing. Visual Studio likely is aware of the System.Drawing namespace however it is not included NinjaTrader 8 which is why you are seeing it in VS but not NT.
Please let us know if you have any further questions.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by sjsj2732, Yesterday, 04:31 AM
|
0 responses
22 views
0 likes
|
Last Post
by sjsj2732
Yesterday, 04:31 AM
|
||
|
Started by NullPointStrategies, 03-13-2026, 05:17 AM
|
0 responses
280 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
279 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
130 views
1 like
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
90 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|

Comment