Announcement

Collapse
No announcement yet.

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
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Today, 05:17 AM
    0 responses
    38 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    124 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    64 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    41 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    46 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X