Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Set Range of Bar Type Property
Collapse
X
-
Set Range of Bar Type Property
I would like to be able to set/reset the range constraint on one of the integer properties in a custom BarType. For example, allowing zero or a negative value. It would be nice to have something similar to SetPropertyOrder() (i.e. SetPropertyRange(min, max)). How can this be accomplished?Tags: None
-
Hello aslane,
As the properties are created behind the scenes, this would have to be accomplished with custom logic.
You could ensure the value is set to a value within your own custom range as the script starts. For example if i wanted between -5 and 5.
myValue = Math.Max(-5, Math.Min(5, myValue));
This would return which ever is smaller, the variable value or 5 (as the upper bound) and will return whichever is larger, the variable or -5 (as the lower bound).Chelsea B.NinjaTrader Customer Service
- Likes 1
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
571 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
331 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
549 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
550 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment