Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

strategies not synchronized

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

    strategies not synchronized

    I have a strategy and I apply it to the same instrument (Forex data provider is IB). One works with a demo account and the other one on a real time account. Parameters are the same with the same time frame. I start the strategies with an hour difference.

    Several hours later the strategy that was started first opens a position and several hours later the second started strategy opens the same position.

    Why does it happen? if everyting is the same why signals don't trigger at the same time?

    #2
    Hello,

    The issue may be coming from the Bars Required to Trade setting for the strategy. Can you tell me the interval that you are using? Depending on the interval that you are using, it is possible that the second strategy has not reached the number bars required to trade at the time that the first strategy takes its trade.

    I look forward to your reply.
    Dave I.NinjaTrader Product Management

    Comment


      #3
      Min. bars to trade is 20. Days to load is 200. And the time frame is 100 min.

      Comment


        #4
        This could be the cause. Do you see the same behavior if you start both strategies at the same time?
        Dave I.NinjaTrader Product Management

        Comment


          #5
          If I start at the same time the difference is very small. What do you mean with "This could be the cause".

          And, if I start it in different moments, wich one is the good one?

          Comment


            #6
            Hello guillembm,

            Thank you for your response.

            When you start the strategy is important. From the point you start the strategy back it will need to calculate the historical trades and then calculate the current position. Minimum Bars To Trade sets how many bars are need on the chart form left to right before the strategy starts to calculate orders and positions. This will affect the results.

            In addition, when you start a strategy it will load historical data from the provider. If you are running Tick data based bars it will have a large effect on this due to the aggregated tick from Interactive Brokers for real-time but the historical data should be accurate. So when the strategies are started at different times their historical data may vary on tick charts with Interactive Brokers.

            Please let me know if you have any questions.

            Comment


              #7
              Thanks for this clear response.

              Thus, how do I calculate the minimum number of bars required to trade?

              Comment


                #8
                Hello,

                Minimum Bars Required is not something to be calculated, but rather something to set. You can view or change this property in the Strategies window, in the General section. If you would like to check this value in code, you can check the BarsRequired property:

                http://www.ninjatrader.com/support/h...srequired2.htm
                Dave I.NinjaTrader Product Management

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by LawrenHom, Today, 10:45 PM
                0 responses
                3 views
                0 likes
                Last Post LawrenHom  
                Started by love2code2trade, Yesterday, 01:45 PM
                4 responses
                28 views
                0 likes
                Last Post love2code2trade  
                Started by funk10101, Today, 09:43 PM
                0 responses
                7 views
                0 likes
                Last Post funk10101  
                Started by pkefal, 04-11-2024, 07:39 AM
                11 responses
                37 views
                0 likes
                Last Post jeronymite  
                Started by bill2023, Yesterday, 08:51 AM
                8 responses
                44 views
                0 likes
                Last Post bill2023  
                Working...
                X