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 CarlTrading, 03-31-2026, 09:41 PM
|
1 response
72 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
39 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
63 views
2 likes
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
63 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
53 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment