Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

When is an unmanaged order executed ?

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

    When is an unmanaged order executed ?

    Hello,

    In a backtesting process with an unmanaged order, I want to buy on stop 1 lot from the first bar (1 minute) and close the position if any on the very last print on the last bar.

    My problem is to know when to send the orders ? Should i send the buy stop on the last bar of the previous session and send the sell on close on the bar right before the last bar ?

    Thanks very much.

    #2
    Hello guilhem,

    There is not a specific way to know the end of a bar, you would have to wait for the first tick of the next bar to close the current bar. You could use the IsFirstTickOfBar property in realtime to achieve what you are asking but that would not work in historical data because you cannot use OnEachTick processing there.

    Any orders you send will need to be on the current bar so trying to send it on the last bar of the previous session would not work, you would need to know on the current bar if you want to send the order or not when the bar closes.

    I look forward to being of further assistance.

    Comment


      #3
      Thanks Jesse.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      89 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