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 CarlTrading, 03-31-2026, 09:41 PM
          1 response
          127 views
          1 like
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 04-01-2026, 02:41 AM
          0 responses
          73 views
          1 like
          Last Post CarlTrading  
          Started by CaptainJack, 03-31-2026, 11:44 PM
          0 responses
          115 views
          2 likes
          Last Post CaptainJack  
          Started by CarlTrading, 03-30-2026, 11:51 AM
          0 responses
          109 views
          1 like
          Last Post CarlTrading  
          Started by CarlTrading, 03-30-2026, 11:48 AM
          0 responses
          88 views
          0 likes
          Last Post CarlTrading  
          Working...
          X