Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strat builder strategy will not backtest

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

    Strat builder strategy will not backtest

    Hi,

    I am new to NT and wanted to backtest a couple of strategies. Problem is the strategies I create using the strategy builder will not backtest.
    To keep things simple I created a minimal strategy that should enter long when StochRSI crosses above 20, and exit once StochRSI decreases in value.

    In attachment I added screenshots of all steps I went through. Can someone please explain why this strat will not produce results when I try to backtest it?
    (Also included a screenshot of the log that shows an error saying the strat wanted to place an order before the required amount of bars was reached)

    Thanks in advance,

    TradingJean.

    Last edited by tradingjean; 12-30-2019, 07:33 AM.

    #2
    Hello tradingjean,

    Thanks for your post and welcome to the NinjaTrader forums!

    Regrettably your attached files show as an invalid file type and are not viewable.

    As a test, please try backtesting with the platform strategy called SampleMACrossover on the very same data (same bars, same time frame, same dates). This is a known strategy and it will always perform trades. If this strategy produces results then that would verify you have the data. If no results then likely you do not have the data you are trying to back test over and in this case please identify the instrument, dates and time frame as well as what data feed you are connected to.

    The error message only means that your strategy tried to place a trade within the first 20 bars however trades after 20 bars should not be an issue.

    If possible, please try again attaching screenshots.



    Comment


      #3
      Hello Paul,


      Thank you for the quick reply.

      I deleted the .PNG files in the original post and added .jpg to this post. Hopefully you will be able to view them.

      SampleMACrossover works fine with the same data, so that is not the problem it seems.

      Click image for larger version

Name:	2Data.jpg
Views:	344
Size:	46.2 KB
ID:	1082165Click image for larger version

Name:	1general.jpg
Views:	360
Size:	77.1 KB
ID:	1082166Click image for larger version

Name:	3input.jpg
Views:	352
Size:	51.9 KB
ID:	1082167Click image for larger version

Name:	4entryrule.jpg
Views:	358
Size:	56.6 KB
ID:	1082168Click image for larger version

Name:	5exitrule.jpg
Views:	348
Size:	56.6 KB
ID:	1082169

      Comment


        #4
        Click image for larger version

Name:	7log.jpg
Views:	351
Size:	31.1 KB
ID:	1082171Click image for larger version

Name:	6backtest.jpg
Views:	364
Size:	183.5 KB
ID:	1082172

        Comment


          #5
          Hello tradingjean,

          Thanks for your reply and screenshots.

          It looks like you are wanting to enter when the StochRSI crosses above a value of 20. The StochRSI indicator is range bound from 0.0 to 1.0, so you would need to change the input from an integer type (whole number) to a Double type (decimal floating point), you would also need to set the "MIN" value to 0.0 and likely set your default to 0.2.

          In the Strategy Builder, once you have used an input in your "sets" you cannot change the input unless you first remove it from all of the conditions where it is used, first. So please follow this process to change the input:

          1) In Set 1, select the only condition and click "remove". (do not delete or remove the set of the actions of the set)
          2) In the "Inputs and Variables section, you can now change from int to Double and set the default (0.2) and MIN (0.0) as specified.
          3) In Set 1, recreate your entry condition
          4) Click next until finish to re-compile the strategy.

          The strategy should now be able to meet the entry conditions and will place orders.

          For future reference, I would suggest adding a drawing (such as a dot or other drawing marker (found in the Misc folder) in the actions of a set) when you want to see on the chart when that particular sets conditions are true. In this case you would have seen dots for all the exits conditions but none for the entry condition.

          Comment


            #6
            Thank you, it works now. Sorry for your time, should have noticed that myself. Problem is that I am used to having that indicator in %.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by NullPointStrategies, Yesterday, 05:17 AM
            0 responses
            56 views
            0 likes
            Last Post NullPointStrategies  
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            132 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
            45 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