• 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

Control Backtest Cycle

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

    Control Backtest Cycle

    Hi!

    I have a strategy that trades in several instruments, for example MES and MNQ.
    This strategy, has some parameters common to both instruments, for example the target.

    When i have parameters, I can use them to identify a good option.
    However, my strategy has different variables between MES and MNQ and I cannot put that as a parameter.

    So, because of that, I can't optimize these different "parameters" between the instruments.

    Q1: In that case, is there any way to optimize these variables ?

    Q2: Is there any way to control the backtesting cycle via code ? I mean, when the backtest ends, can i change the value for that variable and run another backtest just by code ?


    This solution would help me a lot.


    Thanks!

    #2
    Hello brunoviveiros,

    Thank you for your post.

    Only user inputs may be optimized on - you would need to make any variables that you'd want to optimize on into user inputs for them to be optimized. Otherwise, if they are hard coded variables in the script, you'd have to modify the code each time you want to try a different value.

    There is not a way to control a backtest from NinjaScript. However, I have added a vote for you to an existing feature request to allow NinjaScript control of backtests/optimizations. This request is being tracked under the number SFT-1386.

    As with all feature requests, interest is tracked before implementation is considered, so we cannot offer an ETA or promise of fulfillment. If implemented, it will be noted in the Release Notes page of the Help Guide.

    Release Notes — https://ninjatrader.com/support/helpGuides/nt8/en-us/release_notes.htm
    ​​​​​​​

    Please let us know if we may be of further assistance to you.
    Kate W.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by WHICKED, Today, 01:01 PM
    1 response
    3 views
    0 likes
    Last Post NinjaTrader_Kate  
    Started by polo0202, Today, 12:15 PM
    1 response
    8 views
    0 likes
    Last Post NinjaTrader_BrendanC  
    Started by GARZONJ, Today, 11:27 AM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by NtFan, Today, 11:08 AM
    1 response
    8 views
    0 likes
    Last Post NinjaTrader_Kate  
    Started by anamaria0589, Today, 09:39 AM
    1 response
    14 views
    0 likes
    Last Post NinjaTrader_Jermaine  
    Working...
    X