Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
method returning the same result on different calls
Collapse
X
-
method returning the same result on different calls
So I made a simple class to calculate ranges. In the indicator script when I run the method on different objects I get the same result, it's like the value from one instance gets transffered into the other ones. I've attached pictures with the code and result. I'm pretty new to programming, in fact ninja brought me to c#. Thank you!Tags: None
-
Hello! the time filters are hard coded but different for every object so i'm expecting different results. Maybe it's something in my method that I haven't done right cause it transfers the first results to the next call of the method. What I expect is to input the time filters and get the range of that time period. I bet it's some c# basics that I missed..
Comment
-
Hello nothingtrader,
What is the object that is different?
If the time conditions are hard coded, I wouldn't expect these to change. Are you wanting to have inputs for the time variables?
Below is a link to a forum post that demonstrates using Print() to understand behavior.
Chelsea B.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
599 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
344 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
103 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
558 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
557 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment