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 Mindset, 04-21-2026, 06:46 AM
    0 responses
    88 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    135 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    68 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    119 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    69 views
    0 likes
    Last Post PaulMohn  
    Working...
    X