Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

fill algorithm/ force a fill at a given price

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

    fill algorithm/ force a fill at a given price

    I want to close all open positions at beginning of a sessions and then reopen them at the same price, because I want the strategy stats to recognize the unrealized pnl as realized pnl. (since the strategy stats report only realized pnl.

    When I implemented this work around, I found that when I try to close all positions and then reopen them I actually have to wait for the fills before i can reopen the positions. that means the operation can't be completed at the end of the first bar of session, which is limiting to me because I would not really be doing this in real time.

    so I am wondering if I can somehow force a fill in the system?

    Thanks you

    #2
    Hello newworldguy,

    Thank you for your post.

    Unfortunately, there is no method to force a fill. You could use Market Orders, but in a backtest they would need the next bar's close. You could look into ExitOnClose and ExitOnCloseSeconds:
    Please let me know if you have any questions.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    648 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    369 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    108 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    572 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    573 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X