Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Retrieving Horizontal Lines from .xml file

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

    #31
    Hello RJBen,

    If you wanted to clear the previous text and then print something it would have to go before the print so it clears and then prints again.

    Comment


      #32
      I put
      if (State == State.DataLoaded)
      {
      ClearOutputWindow();
      }​
      in several places. I put it directly in front of every "Print" The program ignored it and continued to Print multiple times in the Output Window.
      Regardless of where I put it, it ignored it. It makes me wonder if the Condition is true.
      This was the last attempt and it doesn't Clear it either.

      protected override void OnBarUpdate()
      {
      if (State == State.Historical)
      return;

      if (State == State.DataLoaded)
      {
      ClearOutputWindow();
      }

      if (DrawObjects.Count > 0)
      {
      Print("Total number of Draw Objects " + DrawObjects.Count);

      Print("******************************");
      }​

      Comment


        #33
        Hello RJBen,

        In OnStateChange DataLoaded is called once when the data is loaded. That won't be called again so you need to remove that condition from OnBarUpdate, if you are trying to clear the output window on each OnBarUpdate event you would just place ClearOutputWindow right after the if (State == State.Historical) return;​

        Comment


          #34
          Jesse you are an absolute genius!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by CarlTrading, 03-31-2026, 09:41 PM
          1 response
          81 views
          1 like
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 04-01-2026, 02:41 AM
          0 responses
          42 views
          0 likes
          Last Post CarlTrading  
          Started by CaptainJack, 03-31-2026, 11:44 PM
          0 responses
          64 views
          2 likes
          Last Post CaptainJack  
          Started by CarlTrading, 03-30-2026, 11:51 AM
          0 responses
          66 views
          0 likes
          Last Post CarlTrading  
          Started by CarlTrading, 03-30-2026, 11:48 AM
          0 responses
          54 views
          0 likes
          Last Post CarlTrading  
          Working...
          X