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 Belfortbucks, Today, 09:29 PM
|
0 responses
3 views
0 likes
|
Last Post
by Belfortbucks
Today, 09:29 PM
|
||
Started by zstheorist, Today, 07:52 PM
|
0 responses
7 views
0 likes
|
Last Post
by zstheorist
Today, 07:52 PM
|
||
Started by pmachiraju, 11-01-2023, 04:46 AM
|
8 responses
150 views
0 likes
|
Last Post
by rehmans
Today, 06:44 PM
|
||
Started by mattbsea, Today, 05:44 PM
|
0 responses
6 views
0 likes
|
Last Post
by mattbsea
Today, 05:44 PM
|
||
Started by RideMe, 04-07-2024, 04:54 PM
|
6 responses
33 views
0 likes
|
Last Post
by RideMe
Today, 05:31 PM
|
Comment