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 algospoke, Yesterday, 06:40 PM
                2 responses
                19 views
                0 likes
                Last Post algospoke  
                Started by ghoul, Today, 06:02 PM
                3 responses
                14 views
                0 likes
                Last Post NinjaTrader_Manfred  
                Started by jeronymite, 04-12-2024, 04:26 PM
                3 responses
                45 views
                0 likes
                Last Post jeronymite  
                Started by Barry Milan, Yesterday, 10:35 PM
                7 responses
                21 views
                0 likes
                Last Post NinjaTrader_Manfred  
                Started by AttiM, 02-14-2024, 05:20 PM
                10 responses
                181 views
                0 likes
                Last Post jeronymite  
                Working...
                X