Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ClearOutputWindow() not working

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

    ClearOutputWindow() not working

    Hi,

    Is there any special way to use ClearOutputWindow() ?

    It doesn't work even with the simplest configuration:

    protected override void OnBarUpdate()
    {
    // Use this method for calculating your indicator values. Assign a value to each
    // plot below by replacing 'Close[0]' with your own formula.
    Plot0.Set(Close[0]);
    Print("123");
    ClearOutputWindow();
    }

    The result is an Output window full of "123"s.

    #2
    Please try on real-time data processing only, so for example start your OnBarUpdate() off with if (Historical) return; then update the indicator. It should remove the test print every bar going forward then.

    Comment


      #3
      I tried setting the end date for today and to use a zen-fire real-time data feed.
      The method still doesn't work.

      What should I do?

      Comment


        #4
        Can you please attach the script you tested or send to us at support so we could give it a run here for you?

        Thanks

        Comment


          #5
          Of course. See attached code.
          Attached Files

          Comment


            #6
            Please try without the historical data part, so if (Historical) return; added at the OnBarUpdate() start.

            Comment


              #7
              The function works properly when using real-time data or alternatively - reply data after deleting any previous existed historical data.

              Why is it like that?
              Is there a way to use the function on historical data?

              Comment


                #8
                I don't think so, but will check into with development and then update this thread.

                Comment


                  #9
                  OK, thanks.

                  Comment


                    #10
                    Update: this would be expected for the ClearOutputWindow() - the prints itself would be cached on historical data use, so the clear is working but since nothing has been committed to the output window (which happens at the end of historical data processing) - there would be nothing to clear at the point of the historical call.

                    Comment


                      #11
                      So basically the prints are kind of stuck in a cache mode and don't make it through to the commit stage because the end of historical data (where the commit stage should occur) never arrives when using historical data only. Am I right?

                      Comment


                        #12
                        You are correct in understanding, thus dynamically working with this command on historical data would not be possible.

                        Comment


                          #13
                          new in ninjatrader

                          is that it is possible to import data from ADVFN or excel for use in ninja trader

                          Comment


                            #14
                            Welcome to our fourms here - yes, that is possible - please see our info on the import process and expected formats here - http://www.ninjatrader.com/support/h.../importing.htm

                            In the future we would appreciate if you could open a new thread for your issue.

                            Thanks,

                            Comment

                            Latest Posts

                            Collapse

                            Topics Statistics Last Post
                            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                            0 responses
                            574 views
                            0 likes
                            Last Post Geovanny Suaza  
                            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                            0 responses
                            333 views
                            1 like
                            Last Post Geovanny Suaza  
                            Started by Mindset, 02-09-2026, 11:44 AM
                            0 responses
                            101 views
                            0 likes
                            Last Post Mindset
                            by Mindset
                             
                            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                            0 responses
                            553 views
                            1 like
                            Last Post Geovanny Suaza  
                            Started by RFrosty, 01-28-2026, 06:49 PM
                            0 responses
                            551 views
                            1 like
                            Last Post RFrosty
                            by RFrosty
                             
                            Working...
                            X