Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Buy at Close

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

    Buy at Close

    Yes I know there is no such an order. I'm trying to find the best way to acomplish this without loosing any opportunity, nor tick.

    My system:

    - 2 instruments
    - primary instrument 150 tick bars
    - secondary instrument 1 minute bars
    - signals are fired from the primary instrument
    - I want to buy on secondary instrument on the first price of the bar, at open.

    Solutions:
    - Use OnBarClose = true; in the Intialize() method -> This sentence only regards primary instrument!
    - Use BarTimer or system time to fire a market order -> That will be great, but my system clock is quite inaccurate
    - Use FirstTickofBar -> Sorry too late, remenber I want to be the first

    I would really appreciate any idea that helps me to achieve my goal.

    Thanks
    Lalocom

    #2
    Lalocom, it would seem then a logical solution to sync the PC clock with tools like Dimension4 / Atomic Clock Sync at regular intervals throughout the trading day and submit an order for example 1-2 seconds before the prior BIP1 bar finishes -> that would be very close then to the 'unknown' next bar open.

    Comment


      #3
      Dimension4 / Atomic Clock Sync.

      It looks great.

      Thank you Bertrand. I'm gonna try.

      Comment


        #4
        You're welcome, best of luck - those should help, using them regularly and have not seen any issues.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        57 views
        0 likes
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        143 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        161 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 05-10-2026, 08:12 PM
        0 responses
        97 views
        0 likes
        Last Post CarlTrading  
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        276 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Working...
        X