Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Backtesting on volume bars does not work.

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

    Backtesting on volume bars does not work.

    Hello everyone,


    I am trying to do a backtest of a strategy on volume bars, but it does not work. Time-based bars work fine, but this doesn't. What can I do?

    Thank you very much!

    #2
    Hello nicanor.babula,

    Thank you for your post.

    I see that you posted the same question in another section. Please keep one question per open thread so that we can get to you in a timely manner.

    Who are you connected to for data? This is displayed in the lower left hand corner of the Control Center

    Does this occur with the SampleMACrossOver as well?
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      Hi,

      Sorry for the double post, I realized that that automated trading was the wrong section and re-posted here...

      I am connected with CQG.

      Thanks for the quick answer!

      Comment


        #4
        It does not happen with SampleMACrossover, but my strategy has a different structure:

        It runs on Tick data series and then adds programmatically the volume bars.

        Comment


          #5
          Hello nicanor.babula,

          Is the secondary series with the same instrument as the primary or is it a different instrument?

          When backtesting if the instrument of a secondary data series is different from the primary, the Strategy Analyzer will not automatically download historical data for the secondary series. If this is the case, open a chart to that second instrument and load data back to where you are starting your backtest so the data is available when you backtest.

          Let me know if that is not the case.
          Chelsea B.NinjaTrader Customer Service

          Comment


            #6
            The secondary series is of the same instrument. Also the data is there, because the chart is displaying it all...

            Comment


              #7
              Hello nicanor.babula,

              If you add prints that print the bar time in the second bars in progress, do you see these prints in the output window?

              if (BarsInProgress == 1)
              Print(Time[0]);

              Are you trying to place orders to the secondary series and those are not working?

              Are you placing orders on the primary series and these are not working?

              Is the condition to place the order triggering? (A print in the action block will let you know the condition is being triggered)

              May I have a sample strategy that reproduces the issue so that I can test on my end? (This would be a simplified version with only the code necessary to reproduce the issue)

              To export your script do the following:
              1. Click File -> Utilities -> Export NinjaScript
              2. Enter a unique name for the file in the value for 'File name:'
              3. Select the strategy from the objects list on the left -> click the right facing arrow ">" to add the strategy to the export
              4. Click the 'Export' button -> click 'yes' to add any referenced indicators to the export -> click OK to clear the export location message


              By default your exported file will be in the following location:
              • (My) Documents/NinjaTrader 7/bin/Custom/ExportNinjaScript/<export_file_name.zip>


              Below is a link to the help guide on Exporting NinjaScripts.
              http://www.ninjatrader.com/support/h...nt7/export.htm
              Chelsea B.NinjaTrader Customer Service

              Comment


                #8
                Hi,

                In the end there was a problem with my strategy. Thank you very much for the support.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by bortz, 11-06-2023, 08:04 AM
                47 responses
                1,606 views
                0 likes
                Last Post aligator  
                Started by jaybedreamin, Today, 05:56 PM
                0 responses
                9 views
                0 likes
                Last Post jaybedreamin  
                Started by DJ888, 04-16-2024, 06:09 PM
                6 responses
                19 views
                0 likes
                Last Post DJ888
                by DJ888
                 
                Started by Jon17, Today, 04:33 PM
                0 responses
                6 views
                0 likes
                Last Post Jon17
                by Jon17
                 
                Started by Javierw.ok, Today, 04:12 PM
                0 responses
                15 views
                0 likes
                Last Post Javierw.ok  
                Working...
                X