Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Live Optimization

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

    Live Optimization

    One thing that I have searched for, but not found, is whether or not it is possible to call the optimizer from within the live strategy. I know I can manually optimize, but this would be a step up.

    Say, for example, I have a strategy which takes the following parameters (using integers in place of bools/enums, for strat optimization purposes):
    1) EMA Period
    2) Long Buys Permitted
    3) Short Sells Permitted
    4) Martingale Order Sizing(1=MG, 0= none, -1=AMG)

    I would like to be able to run the optimizer, and set each of those variables to their optimum values right within the strategy – it could be losing money, maybe it’s just been ‘X’ number of bars since the last optimization… whatever the reason (which could simply be triggererd within the strategy)… perhaps then even deciding that there is no profitable way to use the strategy at the present time, and simply prevent it from doing any trades.

    Is it possible? Would it be an interesting feature to add to a future build?

    #2
    Hello AngryErik,
    Welcome to the forum and I am happy to assist you.

    Unfortunately you cannot optimize automatically.

    You can however check the account performance of the strategy while you are live.
    • In Control Center click on the " Strategies tab"
    • In the Strategies tab right click on any running strategy
    • In the context menu goto Strategy Performance >Real time (or Historical or Historical and real time)
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      Thanks!

      Are the mentioned account performance metrics accessible within the strategy, or would I need to track that performance inside the strategy myself?

      Comment


        #4
        Hello AngryErik,
        Yes, you can access the performance metrics from the code too. Please refer to the Performance and TradeCollections objects to do it. Please refer to our help guide to know more
        JoydeepNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        647 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        368 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        108 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        571 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        573 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X