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

optimization - private variables

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

    optimization - private variables

    Hi,
    In the strategy I have several private variables calculated.
    How can I test all possibilities to find out what set has the best results?
    For example do the long trade if int a = -1, int b = 0, int c = 1 and to exit long trade if a = 1.
    variables a, b, c I calculate base on indicators and correlation to the price.
    Beside the checking the results based on the variables, part of the conditions are as well price leve compared to some indicator f.e. close[0] < ema[0]. how can I check if results are better if there is a sign '>' and not '<'?

    #2
    Hello iskier,

    Thanks for your post.

    It is important to first understand the purpose of optimizations before optimizing a strategy. You can fine-tune the input parameters of a strategy through optimization. Optimization is the process of testing a range of values through iterative backtests to determine the optimal input values over the historical test period based on your optimization fitness.

    Only user-defined input parameters are able to be optimized when running an Optimization in the Strategy Analyzer.

    For example, the Fast user-defined input parameter and Slow user-defined input parameter in the SampleMACrossover script that comes default with NinjaTrader. You could view the Fast and Slow parameters in the SampleMACrossover code by opening a New > NinjaScript Editor window, opening the Strategies folder, and double-clicking on the SampleMACrossover file.

    There would be no optimization options available for optimizing the '>' or '<' comparison operators in a script.

    See this help guide page for more information about running optimizations: https://ninjatrader.com/support/help...a_strategy.htm

    See this help guide page for more information about creating user-defined input parameters: https://ninjatrader.com/support/help...d_input_pa.htm
    Brandon H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by RaddiFX, Today, 10:15 AM
    2 responses
    14 views
    0 likes
    Last Post RaddiFX
    by RaddiFX
     
    Started by patrickmlee007, Today, 09:33 AM
    2 responses
    17 views
    0 likes
    Last Post patrickmlee007  
    Started by magnatauren, 08-15-2020, 02:12 PM
    5 responses
    206 views
    0 likes
    Last Post RaddiFX
    by RaddiFX
     
    Started by rene69851, 05-02-2024, 03:25 PM
    1 response
    22 views
    0 likes
    Last Post rene69851  
    Started by ETFVoyageur, Yesterday, 07:05 PM
    5 responses
    46 views
    0 likes
    Last Post ETFVoyageur  
    Working...
    X