Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Optimizer: Custom

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

    Optimizer: Custom

    I'd like to build my own optimizer. Certainly looking at the code for your "DefaultOptimizer" helps. Are there any other such scripts that I could look at?

    #2
    Hello spottysallrite,

    Thanks for your post.

    Unfortunately, there are no other reference samples available for creating a custom Optimizer other than the DefaultOptimizer script you mentioned.

    That said, you could find methods and properties unique to custom Optimizer development on this help guide page: https://ninjatrader.com/support/help.../optimizer.htm

    This forum thread will be open for other community members to share their insight on developing a custom Optimizer.

    Let us know if we may assist further.
    <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


      #3
      Ok, do you have any suggestions regarding debugging tools? eg, Print ("Stuff") doesn't seem to work, neither does StreamWriter.

      Comment


        #4
        Hello spottysallrite,

        Thanks for your note.

        Instead of Print(), you could use Output.Process() to write a message to the Output window.

        See this help guide page for more information and sample code: https://ninjatrader.com/support/help...g_concepts.htm

        Let us know if we may assist further.
        <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


          #5
          That seems to work only within "OnStateChange()". I need this to happen within "Iterate()".

          Comment


            #6
            Hello spottysallrite,

            Thanks for your note.

            Output.Process() does work within the Iterate() method.

            I have added the sample code from the help guide linked in my previous post to the top of the Iterate() method. When an optimization is run I see prints in the NinjaScript Output window.

            See the attached example script demonstrating this. Also, see the attached image.

            Let us know if we may assist further.
            Attached Files
            <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 Mindset, 04-21-2026, 06:46 AM
            0 responses
            89 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by M4ndoo, 04-20-2026, 05:21 PM
            0 responses
            135 views
            0 likes
            Last Post M4ndoo
            by M4ndoo
             
            Started by M4ndoo, 04-19-2026, 05:54 PM
            0 responses
            68 views
            0 likes
            Last Post M4ndoo
            by M4ndoo
             
            Started by cmoran13, 04-16-2026, 01:02 PM
            0 responses
            119 views
            0 likes
            Last Post cmoran13  
            Started by PaulMohn, 04-10-2026, 11:11 AM
            0 responses
            69 views
            0 likes
            Last Post PaulMohn  
            Working...
            X