Thank you
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
What is the preferred way to access doubles from different class
Collapse
X
-
What is the preferred way to access doubles from different class
Hi i have my doubles in onbarupdate that i access in my script, however when i get to trail in OnMarketData, it doesnt see those doubles. What is the preffered way to access those doubles from onMarketData?
Thank youTags: None
-
Hello tkaboris,
That would be the correct way to share a variable between two methods. If you want to set the value once you would need your logic to set the value once. You can also set that from OnStateChange if that is supposed to just be a default value or set infrequently. C# has what is known as class level variables, you can research this topic in external resources if you wanted to learn more about how C# variables can be used.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Yesterday, 05:17 AM
|
0 responses
79 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
148 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
79 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
52 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
58 views
0 likes
|
Last Post
|

Comment