Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

PnL Printing Output Problems

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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.

    Attached Files

    #2
    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.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Today, 05:17 AM
    0 responses
    52 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    130 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    70 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    44 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    49 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X