Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
SystemPerformance.AllTrades.count no funciona
Collapse
X
-
Hello GerardoAC,
Are you waiting until one bar after the position has changed?
The position takes time to change. Before the position can even change, it also takes time for an order to be submitted, accepted, become working, execution a fill, and then trigger the account and strategy position to change.
When the order changes states, this will update OnOrderUpdate().
When the position changes, this will update OnPositionUpdate().
The position will not have changed after an order method is called in the same run of OnBarUpdate() as the order does not fill instantaneously and position do not change instantaneously.
If you wait until the order fills, then updates OnPositionUpdate with the new position and performance, then the next bar close after these events will show the new position and new performance.
Below is a link to the help guide on OnPositionUpdate().
Below is a link to a reference sample with OnOrderUpdate() sample code.
https://ninjatrader.com/support/help...and_onexec.htmChelsea B.NinjaTrader Customer Service
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Yesterday, 05:17 AM
|
0 responses
64 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
139 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
75 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
45 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
50 views
0 likes
|
Last Post
|

Comment