NT8
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Accessing draw.Diamond in MySharedMethods
Collapse
X
-
Thank you for your question stevenev1.
Static methods in C# can never have instance specific methods.
As a possible work-around, oine common way to get at local variables and methods from a static class is to have a singleton instance of the class kept available. I am attaching one such strategy, which stores a "main" instance of itself in a variable called "self", and which uses this to access the Draw.Diamond method. Please let us know if there are any other ways we can help.
Another possible work-around would be to keep an array or dictionary of live indicator instances, so that your static method can reference multiple instances.
Please let us know if there are any other ways wee can help.Attached FilesJessica P.NinjaTrader Customer Service
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
85 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
47 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
29 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
32 views
0 likes
|
Last Post
|
||
|
Started by Mindset, 02-28-2026, 06:16 AM
|
0 responses
67 views
0 likes
|
Last Post
by Mindset
02-28-2026, 06:16 AM
|

Comment