Thanks for your support.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
PnL Printing Output Problems
Collapse
X
-
PnL Printing Output Problems
High NT Support. Having a problem with this small script that prints out the PnL. Specifically if there is an active position prior to the strategy being enabled. With a ACTIVE position, the moment the strategy is enabled the print method dumps thousands of outputs in about a second. Also wondering how I can prevent the strategy from disabling itself when the close button is deployed on the dome.
Thanks for your support.
Tags: None
-
Hello RinnStrang,
From the given output it appears you are doing a print on each bar. When you start a strategy it processes the historical data and will call OnBarUpdate many times. If your print is in OnBarUpdate its likely that as the reason.
Closing a position manually is expected to terminate any strategies on the given instrument. You would need to not use a strategy if you plan to manually trade at the same time. If you just closed the position to exit the trade then you would have to restart the strategy, it would not know about the manual orders so its default action is to stop.
The addon framework can be used from an Indicator to observe the account or submit orders and that does not have any requirements like a strategy. You could create that type of item if you wanted to manually trade and observe those changes. That also cannot be backtested or have any type of historical trade performance.
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CarlTrading, 03-31-2026, 09:41 PM
|
1 response
45 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
21 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
31 views
1 like
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
50 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
42 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment