• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to Stop Backtest Iteration and Continue with Next

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

    How to Stop Backtest Iteration and Continue with Next

    Hello,

    I have some two inputs that I want to optimize. I only want a backtest certain combinations of the two inputs. I want to know where I can evaluate the inputs and cancel the backtest based on certain combinations of the two inputs.

    For instance, say first input is bool and second input is int and I only want to optimize the range of values of second input when the first input = true;

    Is there a command to use inside the OnStateChange() method to abort the backtest iteration? Intent is to evaluate the two inputs and in certain combinations I would abort the backtest.

    Thanks,

    #2
    Hello,

    Thank you for the question.

    This could be handled in a couple of ways, the way I would recommend would not be to abort the test but rather disable your logic if the property changes.

    The other way would be using Disable() in NT7 or SetState(State.Terminated) in NT8. I did discover in NT8 this causes a crash in the beta and have submitted a request to development for that item so currently I would still only recommend using the first option.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Hello Jesse,

      Has the issue with using SetState(State.Terminated) been resolved in NT8 Beta 8?

      I would like to use this to Terminate execution of a given optimization run and have the strategy continue optimizing with the next set of variable inputs.

      Thanks,

      Comment


        #4
        Hello,

        Thank you for the question.

        I did test this on my end and no longer see the error, I wanted to check, from your own tests are you seeing the same?

        If you have not yet updated to the current beta and tested this I would suggest doing that to confirm this has been resolved.

        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Conall, Today, 06:11 AM
        1 response
        9 views
        0 likes
        Last Post NinjaTrader_Kate  
        Started by CaptainAmericaXX, Today, 07:41 AM
        1 response
        3 views
        0 likes
        Last Post NinjaTrader_Jim  
        Started by Longhornmark, Today, 07:06 AM
        3 responses
        7 views
        0 likes
        Last Post NinjaTrader_PaulH  
        Started by 2sureshk, Today, 07:29 AM
        0 responses
        6 views
        0 likes
        Last Post 2sureshk  
        Started by uday12, Yesterday, 10:26 PM
        1 response
        5 views
        0 likes
        Last Post NinjaTrader_PaulH  
        Working...
        X