Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

strategies run in backtest but not real time

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

    strategies run in backtest but not real time

    Hi,
    Can someone please explain to me why a strategy will run in backtest but not in real time and shows the error: an order ... was ignored because the order was submittted before the property.... barsRequiredToTrade had been met? If it runs in backtest, only ignoring the first 20 bars on the first day, and runs every day after that as soon as the first bar closes, why doesn't it do the same thing in real time?
    thanks,
    David

    #2
    Hello David,

    Thank you for your note.


    So I may accurately assist you, please answer all of the following questions:
    • What version of NinjaTrader are you using? Please provide the entire version number. This can be found under Help -> About
    • Do you see results when running the same test on the SampleMaCrossOver strategy in NinjaTrader with the same settings as your strategy?
    • Who are you connected to? This is displayed in green on the lower left corner of the Control Center window.
    • What instrument(s) (and expiry if applicable) have you selected?
    • What Data Series Type have you selected? Example: Tick, Minute, Day
    • Is your strategy a multi-instrument or multi-time frame strategy? Are you subscribed to live data for all instruments being used?
    • Do you receive an error on the screen? Are there errors on the Log tab of the Control Center (other than the message about the order being ignored)? If so, what do these errors report?
    I look forward to your reply.

    Comment


      #3
      Hi Emily,
      version - 8.0.27.1 64-bit
      sample strategy - backtest results as expected, live would have to wait until tomorrow to see what it does with the opening bar
      connection - rithmic for ninjatrader
      instrument - NQ 03 - 23
      data series - minute
      multi... no
      no errors

      running a backtest on today so far, the backtest shows an execution, but live there was no exection. I attached a picture of the last few days. you'll see that an execution should have occured today at 13:30, but it didn't execute on live Sim.
      Attached Files

      Comment


        #4
        Hi Emily;
        I can't find any documentation that explains how "bars required to trade" works on a strategy that is implemented in the Stratagies window, vs, the way it works in backtest, vs. how it works with a strategy deployed on a chart.

        If a strategy I deploy from the "Strategies" tab of my main window has no associated "chart", and so no historical bars to consider (are there? where is this documented?), how can I expect "BarsRequiredToTrade" to behave?

        David
        Last edited by trader3000a; 03-06-2023, 01:55 PM.

        Comment


          #5
          Hello David,

          Thank you for your reply.

          The Strategies tab of the Control Center does still utilize a "Days to load" property when configuring the strategy instance. What do you currently have selected for days to load, and what are the results if you increase the number of days to load?

          For more information:


          I look forward to your reply.

          Comment


            #6
            Hi Emily,
            I'll try it this morning. That must be my answer. Can this be preset from State.Defaults or...?
            thanks,
            David

            Comment


              #7
              Originally posted by trader3000a View Post
              Hi Emily,
              I'll try it this morning. That must be my answer. Can this be preset from State.Defaults or...?
              thanks,
              David
              Hi David,

              I addressed your question here in the following thread:
              Hi, the "days to load" default of 5 days in the strategies tab setup is insufficient for larger minutes bars sizes (120+). Needing to adjust it for new added strategies invites error. Can we set the default value? If no, please add this as a feature request. thanks, David


              I apologize for any confusion or inconvenience. Thank you for your patience and let me know if you have any other questions or concerns.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by NullPointStrategies, Today, 05:17 AM
              0 responses
              51 views
              0 likes
              Last Post NullPointStrategies  
              Started by argusthome, 03-08-2026, 10:06 AM
              0 responses
              127 views
              0 likes
              Last Post argusthome  
              Started by NabilKhattabi, 03-06-2026, 11:18 AM
              0 responses
              69 views
              0 likes
              Last Post NabilKhattabi  
              Started by Deep42, 03-06-2026, 12:28 AM
              0 responses
              42 views
              0 likes
              Last Post Deep42
              by Deep42
               
              Started by TheRealMorford, 03-05-2026, 06:15 PM
              0 responses
              46 views
              0 likes
              Last Post TheRealMorford  
              Working...
              X