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

Print without continuous updates in scroll bar

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

    Print without continuous updates in scroll bar

    Hi NT8 support,

    I am looking for a method for the print function to simply update one line continuously as opposed to continue to output each instance of my print so that it scrolls down with many lines. Is there any way for an output to just update one single line each time the print instance occurs to where that number updates without continuously printing down the window?

    Normal Print looks like:

    In Ninjascript Output Window
    Variable: 100
    Variable: 105
    Variable: 107
    etc
    etc

    Looking for:

    In Ninjascript Output Window
    Variable: 100 (and this single line updated to, say 105 on the next instance)
    (does not print another line here on next instance but updates first line)

    Thank you!

    #2
    Hello Austiner87,

    Thanks for your post.

    You can issue ClearOutputWindow() before each print.

    This method is demonstrated in the example indicator SampleLevel2Book which provides what looks like updated lines:

    Ask Book
    Ask Price=11635.25 Volume=1 Position=0
    Ask Price=11635.75 Volume=1 Position=1
    Ask Price=11636 Volume=2 Position=2
    Ask Price=11636.25 Volume=2 Position=3
    Ask Price=11636.5 Volume=2 Position=4
    Ask Price=11636.75 Volume=5 Position=5
    Ask Price=11637 Volume=3 Position=6
    Ask Price=11637.25 Volume=2 Position=7
    Ask Price=11637.5 Volume=1 Position=8
    Ask Price=11637.75 Volume=1 Position=9
    Bid Book
    Bid Price=11634.25 Volume=3 Position=0
    Bid Price=11634 Volume=1 Position=1
    Bid Price=11633.75 Volume=2 Position=2
    Bid Price=11633.5 Volume=4 Position=3
    Bid Price=11633.25 Volume=1 Position=4
    Bid Price=11633 Volume=4 Position=5
    Bid Price=11632.75 Volume=2 Position=6
    Bid Price=11632.5 Volume=4 Position=7
    Bid Price=11632.25 Volume=2 Position=8
    Bid Price=11632 Volume=2 Position=9

    but in reality, it is just clearing the window before printing each update all of the lines.

    References:





    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Extremely helpful, thank you

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by trilliantrader, 04-18-2024, 08:16 AM
      4 responses
      18 views
      0 likes
      Last Post trilliantrader  
      Started by mgco4you, Today, 09:46 PM
      1 response
      7 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by wzgy0920, Today, 09:53 PM
      0 responses
      9 views
      0 likes
      Last Post wzgy0920  
      Started by Rapine Heihei, Today, 08:19 PM
      1 response
      10 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by Rapine Heihei, Today, 08:25 PM
      0 responses
      10 views
      0 likes
      Last Post Rapine Heihei  
      Working...
      X