Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy test on playback won't trade on last week's data

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

    Strategy test on playback won't trade on last week's data

    Hi there,

    I am testing my strategy on playback data, it's working fine with NQ 03-20, during Jan - Feb etc. but won't trade once I switch to last week's data, I did download the NQ 09-20 playback data till last Friday (7-24-2020) and the chart works/strategy enabled/indicator loaded and showing, chart moving... but just no trade no output message either...does this have anything to do with StartBehavior? any ideas? Thanks!

    #2
    Hello PowerGrid,

    Is the Chart also NQ 09-20?

    There are new bars appearing on the chart?

    The strategy is applied in the Strategies window from the chart? (Not added to the Strategies tab of the Control Center directly?)

    The strategy is showing as Enabled on the Strategies tab of the Control Center?

    If the strategy is getting data and the strategy is enabled and there is data appearing, then would likely indicate the logic conditions did not evaluate as true or orders are being ignored or cancelled.
    In order to better understand how the code is working, it will be necessary to use Print and enable TraceOrders to see how the conditions are evaluating and if orders are being submitted, ignored, or cancelled.

    Below is a link to a forum post that demonstrates using prints to understand behavior.
    https://ninjatrader.com/support/forum/forum/ninjatrader-7/strategy-development-aa/99209-date-conditions-not-working?p=791121#post791121

    Enable TraceOrders, print the time of the bar and all values used in the conditions that submit entry orders.
    Let me know if you need any assistance creating a print or enabling TraceOrders.
    Save the output from the output window to a text file and provide this with your next post.

    I'll be happy to assist with analyzing the output.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thanks Chelsea for the reply!

      here is my quick answer to your questions:

      1. yes, the chart is getting data NQ 09-20 and running fine. 2. yes, the strategy applied to the chart, 3. yes the order entry condition was met (a simple MACD cross) and 4. yes, TraceOrders Enabled with lots of 'prints' statement...

      I will try to get some screenshot once I get a chance.

      Comment


        #4
        Hello PowerGrid,

        Screenshots would not provide the necessary information.

        I am highly recommending you use prints to understand the behavior.

        What is the time and date where you are expecting an order? What are the values used in the condition?
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Hi Chelsea,

          I found the bug and fixed it, it's a simple statement in the beginning of my strategy:

          AddDataSeries("NQ 03-20", Data.BarsPeriodType.Minute, 1, Data.MarketDataType.Last);

          Once I changed it to "NQ 09-20", everything worked...

          Thanks again!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Shansen, 08-30-2019, 10:18 PM
          24 responses
          938 views
          0 likes
          Last Post spwizard  
          Started by Max238, Today, 01:28 AM
          0 responses
          3 views
          0 likes
          Last Post Max238
          by Max238
           
          Started by rocketman7, Today, 01:00 AM
          0 responses
          1 view
          0 likes
          Last Post rocketman7  
          Started by wzgy0920, 04-20-2024, 06:09 PM
          2 responses
          27 views
          0 likes
          Last Post wzgy0920  
          Started by wzgy0920, 02-22-2024, 01:11 AM
          5 responses
          32 views
          0 likes
          Last Post wzgy0920  
          Working...
          X