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 algospoke, 04-17-2024, 06:40 PM
|
6 responses
48 views
0 likes
|
Last Post
by algospoke
Today, 06:18 PM
|
||
Started by arvidvanstaey, Today, 02:19 PM
|
4 responses
11 views
0 likes
|
Last Post Today, 04:08 PM | ||
Started by samish18, 04-17-2024, 08:57 AM
|
16 responses
61 views
0 likes
|
Last Post
by samish18
Today, 03:30 PM
|
||
Started by jordanq2, Today, 03:10 PM
|
2 responses
9 views
0 likes
|
Last Post
by jordanq2
Today, 03:23 PM
|
||
Started by traderqz, Today, 12:06 AM
|
10 responses
19 views
0 likes
|
Last Post
by traderqz
Today, 02:49 PM
|
Comment