Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Strategy performance = 0

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

    Strategy performance = 0


    Hi, I have designed a strategy that they run on every tick. Doing market replay works perfectly. However, in the strategy performance, or in the strategy analyzer I always get a result of 0. I have tried activating the tick replay but I do not get data either. What could the error be due to? Thank you

    #2
    Hello manueldecastro,

    Thanks for your post.

    Market replay - If your strategy is working perfectly I assume that means that you see trades on the chart as you run market replay. To see the strategy performance, after the market replay has run and before you change anything, right mouse click on the chart and select Strategy Performance>real time and this will show the performance of the strategy. You must select real-time as this is how market replay data is treated. Critically, you must not change or reset the market replay as this will automatically reset the account Playback101, until you have gotten your strategy performance data.

    Strategy Aanalyzer - I would suggest testing with a known strategy using the very same data(including tick replay). Please test with SampleMACrossover strategy in your NinjaTrader. This strategy will always be in the market and will generate many trades and is a good way to test that you have the historical data needed. If it shows no trades or only a few trades then you may not have the historical data needed. If you are using Tick replay this means that you must have tick data for the entire duration of the backtesting period.

    If SampleMACrossover places trades but your strategy does not then that suggests there may be an issue with your strategy when testing on historical data.

    Paul H.NinjaTrader Customer Service

    Comment


      #3

      Hello Paul, The strategy works well, and in replay when doing the "real" it gives the data correctly. He designed many similar strategies and they all give me historical data but not in this case. I use the accumulated delta I do not know if it will be the reason that he does not give me the historical data.

      Comment


        #4
        Hello manueldecastro,

        Thanks for your reply.

        When you apply your strategy to a live data chart, do you see historical trades made on previous days of the chart?
        Paul H.NinjaTrader Customer Service

        Comment


          #5
          no. i cant see any historical trade on previous days

          Comment


            #6
            Hello manueldecastro,

            Thanks for your reply.

            Then that would suggest that your strategy does not process historical trades so no trades in the strategy analyzer would be an expected result for that strategy.
            Market replay data is treated like Real time data so it makes sense that it works there as it works on live data.

            Does your strategy include anything like:

            if (State == State.Historical) return;

            or

            if (State != State.RealTime) return;

            Either of those would prevent historical operations on code below those lines.
            Paul H.NinjaTrader Customer Service

            Comment


              #7

              Hello Paul, I know how the historical and realtime commands work. my strategy does not include any of them. The system is based on moving averages and accumulated delta. With the original ninja cummulative delta script, no orders are executed, however, with the delta indicator from https://www.gomicators.com/ the strategy operates correctly but I don't get historical data

              Comment


                #8
                Hello manueldecastro,

                Thanks for your reply.

                In the case of Order Flow Cumulative Delta, your strategy would need to add a 1 tick data series to provide its historical needs.
                Please check the "Log" tab of the control center for any error messages when you run your strategy with the Order Flow Cumulative delta.
                This indicator does require that the strategy pass a 1 tick series to it.

                If no errors and you are applying the 1 tick series in the strategy to support the indicator, then I recommend debugging your strategy with print statements. What you would want to print is the value of all the variables that are involved in the entry conditions to see why no trades are being generated.

                Here is a link to our debugging tips: https://ninjatrader.com/support/help...script_cod.htm

                Paul H.NinjaTrader Customer Service

                Comment


                  #9
                  solved. thanks

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by fiddich, Today, 05:25 PM
                  0 responses
                  2 views
                  0 likes
                  Last Post fiddich
                  by fiddich
                   
                  Started by gemify, 11-11-2022, 11:52 AM
                  6 responses
                  803 views
                  2 likes
                  Last Post ultls
                  by ultls
                   
                  Started by ScottWalsh, Today, 04:52 PM
                  0 responses
                  4 views
                  0 likes
                  Last Post ScottWalsh  
                  Started by ScottWalsh, Today, 04:29 PM
                  0 responses
                  7 views
                  0 likes
                  Last Post ScottWalsh  
                  Started by rtwave, 04-12-2024, 09:30 AM
                  2 responses
                  22 views
                  0 likes
                  Last Post rtwave
                  by rtwave
                   
                  Working...
                  X