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.

    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.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by GussJ, 03-04-2020, 03:11 PM
        16 responses
        3,279 views
        0 likes
        Last Post Leafcutter  
        Started by WHICKED, Today, 12:45 PM
        2 responses
        19 views
        0 likes
        Last Post WHICKED
        by WHICKED
         
        Started by Tim-c, Today, 02:10 PM
        1 response
        8 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by Taddypole, Today, 02:47 PM
        0 responses
        5 views
        0 likes
        Last Post Taddypole  
        Started by chbruno, 04-24-2024, 04:10 PM
        4 responses
        51 views
        0 likes
        Last Post chbruno
        by chbruno
         
        Working...
        X