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 NullPointStrategies, Today, 05:17 AM
      0 responses
      51 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      127 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      69 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      42 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      46 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X