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(output1 and 2)

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

    Print(output1 and 2)

    I try to understand the concept of printing in output tab 1 and 2 but i find the exemple in https://ninjatrader.com/support/helpGuides/nt8/en-us/ confusing.

    First do we need to call PrintTo=PrintTo.OutputTab1; in State==State.SetDefaults?

    The only thing i want to do is to Print


    if ((closest <= fibo))
    {
    Print(closest.ToString("N4")); Why cant we just doPrintTo.OutputTab1closest.ToString("N4")); ?
    }

    and Print:

    if ((closest >= fibo))
    {
    Print(closest.ToString("N4")); Why cant we just do PrintTo.OutputTab2(closest.ToString("N4")); ?

    }

    thank you

    #2
    Hello frankduc,

    The only thing i want to do is to Print
    If you just want to print, you don't need to use this property at all.

    If you wanted to use a specific output window tab, that can be set using this property.

    This is a script property which you set to define how the script works in general. If you wanted this script specifically to always print to output 2, you could set that in State.SetDefaults. If you just wanted output 1, this property doesn't have to be used at all. You can also see the sample on the PrintTo page "Setting PrintTo conditionally in a single script" if you wanted to switch between outputs later in your logic, there are multiple use cases shown in that help document.

    Why cant we just do PrintTo.OutputTab2(closest.ToString("N4"));
    Because this is not valid syntax. You would need to use the "Setting PrintTo conditionally in a single script" sample on the PrintTo page if you wanted to specify a window before a print.

    Please let me know if I may be of further assistance.



    JesseNinjaTrader Customer Service

    Comment


      #3
      ok i get it!
      thanks

      Chelsea did not reply my last post (probably she's off duty)
      Can you reply if you have the time?

      Comment


        #4
        Hello frankduc,

        Yes I will notify him that you mentioned him in this post. He will otherwise reply when he is available to reply.

        Please let me know if I may be of additional assistance.
        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by GussJ, 03-04-2020, 03:11 PM
        11 responses
        3,227 views
        0 likes
        Last Post xiinteractive  
        Started by andrewtrades, Today, 04:57 PM
        1 response
        13 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by chbruno, Today, 04:10 PM
        0 responses
        7 views
        0 likes
        Last Post chbruno
        by chbruno
         
        Started by josh18955, 03-25-2023, 11:16 AM
        6 responses
        440 views
        0 likes
        Last Post Delerium  
        Started by FAQtrader, Today, 03:35 PM
        0 responses
        12 views
        0 likes
        Last Post FAQtrader  
        Working...
        X