Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

sync strategy with account

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

    #16
    Hello,

    Instead of using the return statement and DateTime.Now and take this out. Then add in a time filter to only allow the strategy to trade during this time.

    Please see this sample on how to do this.



    Let me know if I can be of further assistance.
    BrettNinjaTrader Product Management

    Comment


      #17
      If I understand correctly, when running on historical daily bars, Time[0] will always be 93000, so a condition like (ToTime(Time[0]) >= 150000) will always be false, and therefor I will again get flat positions when running on historical after I enable it.
      So how can I combine between daily historical bars, and intraday execution when running realtime?

      Comment


        #18
        Hello,

        Understood correctly daily bars we cannot look inside the bar to tell what occured at what time. Only live.

        Therefor you are unable to do this with daily bars.

        You would need to add in a secondary data series of minute bars to be able to do this Intra bar and is known as adding granularity.You would add in minute bars and then move all your order execution to these minute bars to run off of it and the order submission logic you could still have your daily bar inputs.



        Let me know if I can be of further assistance.
        BrettNinjaTrader Product Management

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        115 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        161 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        83 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        127 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        81 views
        0 likes
        Last Post PaulMohn  
        Working...
        X