Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Create a Form to Display Values from Strategy

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

    Create a Form to Display Values from Strategy

    Hi,

    I have been screening help files to create a form to display values from strategy and to update values whilst the strategy is running. This is to assist in debugging / optimisation of the strategy.

    I am getting more and more confused with every help topic I read. It seems very complicated. Is there a simple way to do this without creating AddOns and Indicators to pass values?

    Additionally, I can't use Print() to debug the AddOn I created. Is this normal, or have I messed something up?

    Thanks

    Ian

    #2
    Hello Ian,

    Manual intervention during a backtest or optimization would be outside of what is supported by NinjaTrader.
    Backtesting/Optimizing is intended to be completely automated using the parameters of the strategy.

    That said, below is a link to an example of passing values to an addon (from an indicator) and back you may find helpful.


    And a link to an example of static objects.


    In an Addon that is outside of the Indicator and Strategy namespaces, instead of Print(), use Output.Process() to write a message.
    Instead of ClearOutputWindow(), use Output.Reset() to clear the output window.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thanks Chelsea.

      The form would be used during forward testing of the strategy when 'unexpected things' happen and to determine what needs to be done to make the strategy work as required.

      Thanks again

      Ian

      Comment


        #4
        Hi Chelsea,

        I get an error Output does not exist in the current context. Any ideas?

        Thanks

        Ian

        Comment


          #5
          Hello Ian,

          Not sure what namespace you are in, but try:

          NinjaTrader.Code.Output.Process()
          Chelsea B.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by NullPointStrategies, Yesterday, 05:17 AM
          0 responses
          56 views
          0 likes
          Last Post NullPointStrategies  
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          132 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          73 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          45 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          49 views
          0 likes
          Last Post TheRealMorford  
          Working...
          X