Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy not running/No Print() output

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

    Strategy not running/No Print() output

    After converting all my int volumes to long volumes my code from 6.5 seemed to compile without error (there is not compile complete dialog box anymore correct?)

    Anyways, the strategy shows up in the Strategies window to add. But nothing seems to be running. No errors in the log. No print output.

    I tried a basic print test, same deal. No print output. Tried removing adding refreshing. Nothing.

    PHP Code:
    #region Using declarations
    using System;
    using System.ComponentModel;
    using System.Diagnostics;
    using System.Drawing;
    using System.Drawing.Drawing2D;
    using System.Xml.Serialization;
    using NinjaTrader.Cbi;
    using NinjaTrader.Data;
    using NinjaTrader.Indicator;
    using NinjaTrader.Gui.Chart;
    using NinjaTrader.Strategy;
    #endregion
    
    // This namespace holds all strategies and is required. Do not change it.
    namespace NinjaTrader.Strategy
    {
        /// <summary>
        /// Enter the description of your strategy here
        /// </summary>
        [Description("Enter the description of your strategy here")]
        public class Test : Strategy
        {
            #region Variables
            // Wizard generated variables
            private int myInput0 = 1; // Default setting for MyInput0
            // User defined variables (add any user defined variables below)
            #endregion
    
            /// <summary>
            /// This method is used to configure the strategy and is called once before any strategy method is called.
            /// </summary>
            protected override void Initialize()
            {
                CalculateOnBarClose = false;
            }
    
            /// <summary>
            /// Called on each bar update event (incoming tick)
            /// </summary>
            protected override void OnBarUpdate()
            {
                Print("Womp");
            }
    
            #region Properties
            [Description("")]
            [GridCategory("Parameters")]
            public int MyInput0
            {
                get { return myInput0; }
                set { myInput0 = Math.Max(1, value); }
            }
            #endregion
        }
    } 
    

    #2
    I'm running from market replay data.

    Comment


      #3
      Correct, there's only a sound for successfull compile feedback, no box anymore. Is the strategy enabled from the UI as you add it? This is new in NT7 because of it's strategy persistence concepts added.

      Comment


        #4
        I'm now thinking the (D) next to the strategy meant disabled. It works now. Thanks.

        Comment


          #5
          Yes, exactly - thanks for reporting back.

          Comment


            #6
            (D) isn't exactly intuitive for first time users. Do you think it should maybe say (Disabled) instead?

            If I saw (disabled), i would have taken a closer look at the strategy properties. In any case this is resolved. Thanks.

            Comment


              #7
              Hi Tight Face,

              I will forward your comments on to my development team for further consideration.
              KyleNinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              621 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              359 views
              1 like
              Last Post Geovanny Suaza  
              Started by Mindset, 02-09-2026, 11:44 AM
              0 responses
              105 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
              0 responses
              562 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              567 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X