Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy Builder - Realized PnL question

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

    Strategy Builder - Realized PnL question

    I'm using the Strategy Builder to create a script and i'm testing it in Playback mode with Historical data. As the script runs i want to keep track of my Realized PnL. Should the realized PnL go below a certain level the stategy should stop trading.

    The problem i'm having is that before an actual trade has happened there is already a Realised PnL value. This appears to be based on hypothetical trades that could have occured before the strategy was actually enabled.

    Because of this preexisting value i am unable to establish what the "real" PnL from actual trades is.
    Any ideas, suggestions or advice?
    Thanks

    #2
    Hello cupir2,

    When you apply a strategy it runs a backtest initially so it will start with some trades in the performance. Depending on when you start playback you may be able to isolate the current trades. Most commonly you would use the session to reset the pnl variable so you know the session pnl, there is a sample of that concept here.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    87 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    128 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    65 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    117 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    67 views
    0 likes
    Last Post PaulMohn  
    Working...
    X