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 SalmaTrader, 07-07-2026, 10:26 PM
    0 responses
    50 views
    0 likes
    Last Post SalmaTrader  
    Started by CarlTrading, 07-05-2026, 01:16 PM
    0 responses
    22 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 06-17-2026, 10:32 AM
    0 responses
    16 views
    0 likes
    Last Post CaptainJack  
    Started by kinfxhk, 06-17-2026, 04:15 AM
    0 responses
    22 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 06-17-2026, 04:06 AM
    0 responses
    23 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Working...
    X