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 CarlTrading, 03-31-2026, 09:41 PM
        1 response
        67 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        36 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        60 views
        1 like
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        62 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        53 views
        0 likes
        Last Post CarlTrading  
        Working...
        X