Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.
    BertrandNinjaTrader Customer Service

    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
        BertrandNinjaTrader Customer Service

        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.
            BertrandNinjaTrader Customer Service

            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.
                BertrandNinjaTrader Customer Service

                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.
                    BertrandNinjaTrader Customer Service

                    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.
                        BertrandNinjaTrader Customer Service

                        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,
                            BertrandNinjaTrader Customer Service

                            Comment

                            Latest Posts

                            Collapse

                            Topics Statistics Last Post
                            Started by alifarahani, Today, 09:40 AM
                            3 responses
                            15 views
                            0 likes
                            Last Post NinjaTrader_Jesse  
                            Started by RookieTrader, Today, 09:37 AM
                            4 responses
                            18 views
                            0 likes
                            Last Post RookieTrader  
                            Started by PaulMohn, Today, 12:36 PM
                            0 responses
                            5 views
                            0 likes
                            Last Post PaulMohn  
                            Started by love2code2trade, 04-17-2024, 01:45 PM
                            4 responses
                            40 views
                            0 likes
                            Last Post love2code2trade  
                            Started by junkone, Today, 11:37 AM
                            3 responses
                            26 views
                            0 likes
                            Last Post NinjaTrader_ChelseaB  
                            Working...
                            X