Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

account sync problem

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

    account sync problem

    I am having an account sync problem with strategy will not engage (using wait until flat)orders are ignored receive error in log stating An order placed 5/14/2023 630 pm has been ignored since the order was submitted before the straegy propperty BarsRequiredToTrade had been met This has just started with all strategy just different dates show up on all instruments. when using Immediately submit or any other options the orders go thru but either put me on opposite side of market or double up on orders. This just started I have closed all orders flatten everything closed and restarted program to no avail

    thanks​

    #2
    Hello kudos,

    Thanks for your post.

    The message "An order placed 5/14/2023 630 pm has been ignored since the order was submitted before the straegy propperty BarsRequiredToTrade had been met" is a warning message letting you know that the strategy tried to submit an order before the BarsRequiredToTrade was met.

    By default BarsRequiredToTrade is set to 20. This means that 20 bars must be populated on the chart before the strategy can place an order.

    You could simply set the BarsRequiredToTrade property to 0 in OnStateChange() State.SetDefaults or set it to 0 in the Properties section of the Strategies window when enabling the strategy.

    See this help guide page for more information about BarsRequiredToTrade: https://ninjatrader.com/support/help...redtotrade.htm
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment


      #3
      Brandon Thanks for the response Something else is going on all my strategy created with the builder have worked for ever now everyone that places an order has the same error.. i just used the builder for simple program Buy on close[0] greater than close[1] and still get exact same error the day of error changes this one says 6/11/2023 instead of 5/14/2023 everything worked as should now everyone does the same they were not modified. Any help be appreciated

      Comment


        #4
        Hello kudos,

        Thanks for your note.

        If you are still referring to the BarsRequiredToTrade property warning message, you could set the BarsRequiredToTrade property to 0 when enabling your strategy to prevent this warning message.

        See the attached screenshot demonstrating this.

        Attached Files
        <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

        Comment


          #5

          This is from builder it also throws the same error Strategy TEST/275329276. An order placed at 6/11/2023 5::06 PM (The time and date presently is6/14/2023 4;08 57 PM) has been ignored since the order was submitted before the strategy property BarsRequiredToTrade had been sent. This feels like a corruption somewhere as i noticed orders suddenly quit being placed. They where not modified in any way the drawing still posts to chart but orders on none of strategy will work on sim or live. They have worked with no problem for ever. Below i posted a very simple starategy with builder ninja8 it will not place an order either



          else if (State == State.Configure)
          {
          }
          }

          protected override void OnBarUpdate()
          {
          if (BarsInProgress != 0)
          return;

          if (CurrentBars[0] < 1)
          return;

          // Set 1
          if (Close[0] > Close[1])
          {
          EnterLong(Convert.ToInt32(DefaultQuantity), "");
          BackBrush = Brushes.LightGreen;
          }

          // Set 2
          if (Close[0] < Close[1])
          {
          EnterShort(Convert.ToInt32(DefaultQuantity), "");
          BackBrush = Brushes.Red;
          }

          }
          }
          }​

          Comment


            #6
            Yes BarsToTrade is set to 0 still same result

            Comment


              #7
              Hello kudos,

              Thanks for your notes.

              When testing the code you shared on my end, I am not seeing the warning message after setting BarsRequiredToTrade to 0 when enabling the script.

              The warning message does not appear when BarsRequiredToTrade is set to 0 and orders are placed when the condition to place the orders is true.

              Note that if the strategy calculates it is in a historical (virtual) position when enabled, such as 1 Long, the condition to place a short order would need to be true before you see orders placed. An example of this is seen in the demonstration video below.

              See this demonstration video: https://brandonh-ninjatrader.tinytak...Nl8yMTYwNDY3MQ

              I have also attached the Strategy Builder strategy used to test this for you to view.
              Attached Files
              <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

              Comment


                #8
                There error message continues across all strategy Looks like I need to reinstall the platform . Any other ideas

                Comment


                  #9
                  The Kudo Test compiled correctly but still gives me the same error How is best to reinstall platform but still keep everything else the same

                  Comment


                    #10
                    Hello kudos,

                    Thanks for your note.

                    What version of NinjaTrader are you using? Please provide the entire version number. This can be found under Help -> About (Example: 8.0.?.?)​

                    Please create and share a short demonstration video using the free TinyTake application linked below that shows the behavior you are reporting when enabling the kudosTest strategy on a chart with BarsRequiredToTrade set to 0.

                    TinyTake: https://tinytake.com/tinytake-download

                    I look forward to assisting further.
                    Last edited by NinjaTrader_BrandonH; 06-15-2023, 09:55 AM.
                    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by NullPointStrategies, Yesterday, 05:17 AM
                    0 responses
                    54 views
                    0 likes
                    Last Post NullPointStrategies  
                    Started by argusthome, 03-08-2026, 10:06 AM
                    0 responses
                    131 views
                    0 likes
                    Last Post argusthome  
                    Started by NabilKhattabi, 03-06-2026, 11:18 AM
                    0 responses
                    73 views
                    0 likes
                    Last Post NabilKhattabi  
                    Started by Deep42, 03-06-2026, 12:28 AM
                    0 responses
                    44 views
                    0 likes
                    Last Post Deep42
                    by Deep42
                     
                    Started by TheRealMorford, 03-05-2026, 06:15 PM
                    0 responses
                    49 views
                    0 likes
                    Last Post TheRealMorford  
                    Working...
                    X