Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

PrintTo

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

    PrintTo

    I followed this guide https://ninjatrader.com/support/help...ml?printto.htm

    In order to print 1 strategy to Output 1 and another strategy to Output 2 but it doesn't work. I put this code in setdefaults;

    PrintTo = PrintTo.OutputTab1;

    Then in my other strategy;

    PrintTo = PrintTo.OutputTab2;

    And my output tabs are named the default. Output 1 and Output 2.

    Everything just gets output to Output 1

    #2
    Hello several,

    Thank you for your post.

    When I test the code out, it does print to Output tab 2. If you changed the code in State.SetDefaults after already applying the strategy to the chart, you'll need to remove the old strategy instance and add a new instance in order to pull the new defaults.

    Please see the attached test script.
    Attached Files

    Comment


      #3
      THANKS, removing and adding it again fixed it.

      Comment


        #4
        WHY oh why does your instruction page (https://developer.ninjatrader.com/docs/desktop/printto) include these 2 statements:

        Name = "Sample PrintTo Indicator #1";
        Description = @"Used to Print updates to Output 1";

        For the PrintTo = PrintTo.OutputTab1;​ statement???

        When you add those statements, your strategy disappears, and it is nowhere to be found when trying to apply it to a chart.

        Grrrr, another 30mins wasted. Please fix.​

        Comment


          #5
          Hello nelslynn,

          That is just sample code, you're not meant to actually change the Name and Description of your own script..

          It's only meant to demonstrate setting PrintTo in State.SetDefaults. The Name and Description are not part of that statement, they are completely separate lines denoted by the semicolon at the end of each line.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          558 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          324 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          101 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          545 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          547 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X