if (Math.Abs(Position.Quantity) <= maxPositionSize)
{
// Execute a trade here because we're not at the max position size
}
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Position.Quantity
Collapse
X
-
Position.Quantity
It is my understanding that this value is an (int)...so without testing (I don't want to wait around for an example to debug), is the following code valid:
maxPositionSize is an integer > 0.Code:Tags: None
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by kinfxhk, 07-13-2026, 10:18 AM
|
0 responses
30 views
0 likes
|
Last Post
by kinfxhk
07-13-2026, 10:18 AM
|
||
|
Started by kinfxhk, 07-13-2026, 09:50 AM
|
0 responses
24 views
0 likes
|
Last Post
by kinfxhk
07-13-2026, 09:50 AM
|
||
|
Started by kinfxhk, 07-13-2026, 07:21 AM
|
0 responses
30 views
0 likes
|
Last Post
by kinfxhk
07-13-2026, 07:21 AM
|
||
|
Started by kinfxhk, 07-11-2026, 02:11 AM
|
0 responses
27 views
0 likes
|
Last Post
by kinfxhk
07-11-2026, 02:11 AM
|
||
|
Started by SalmaTrader, 07-07-2026, 10:26 PM
|
0 responses
141 views
0 likes
|
Last Post
by SalmaTrader
07-07-2026, 10:26 PM
|

Comment