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 judysamnt7, 03-13-2023, 09:11 AM
        4 responses
        59 views
        0 likes
        Last Post DynamicTest  
        Started by ScottWalsh, Today, 06:52 PM
        4 responses
        36 views
        0 likes
        Last Post ScottWalsh  
        Started by olisav57, Today, 07:39 PM
        0 responses
        7 views
        0 likes
        Last Post olisav57  
        Started by trilliantrader, Today, 03:01 PM
        2 responses
        21 views
        0 likes
        Last Post helpwanted  
        Started by cre8able, Today, 07:24 PM
        0 responses
        10 views
        0 likes
        Last Post cre8able  
        Working...
        X