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 charlesugo_1, 05-26-2026, 05:03 PM
|
0 responses
68 views
0 likes
|
Last Post
by charlesugo_1
05-26-2026, 05:03 PM
|
||
|
Started by DannyP96, 05-18-2026, 02:38 PM
|
1 response
150 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
162 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|
||
|
Started by CarlTrading, 05-10-2026, 08:12 PM
|
0 responses
100 views
0 likes
|
Last Post
by CarlTrading
05-10-2026, 08:12 PM
|
||
|
Started by Hwop38, 05-04-2026, 07:02 PM
|
0 responses
288 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|

Comment