Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Shared Variable
Collapse
X
-
Shared Variable
I would like some help to determine which is the best way to proceed with using the output of one indicator as a parameter in several other indicators. The "publishing" indicator is rather cpu intensive so I want to avoid having multiple instances of it. I only need the value of the most recent bar so I feel as though it should be simple to store in a variable. I have read may threads on this site and others and there seems to be lots of suggestions with only minimal success. I understand that a good number of approaches are un-supported but any help in leading me down the best path would be greatly appreciate. I have looked into static variables, globalvariables.dll, userdefinedmethods etc and am unsure how to proceed. I am currently trying to implement a static variable but do not fully comprehend how to do it.Tags: None
-
Hello Taggart,
Thank you for your note.
Would this be something you could not use in the user defined methods?
Take a look at the following link for more information: http://www.ninjatrader.com/support/h...ed_methods.htm
-
Thanks for the tip. I had mistakenly read "You can not share user defined methods created for custom strategies with custom indicators" to mean that it couldn't be used with custom indicators. Now that you have made me aware I will spend more time understanding this approach and hopefully achieve what I am looking for.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
557 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
324 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
545 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
547 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment