Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

PrintTo = PrintTo.OutputTab2 doesn't work

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

    PrintTo = PrintTo.OutputTab2 doesn't work

    Hello

    I'm trying to print the outputs of a custom indicator in the tab 2 of the output window, but the code in SetDefaults doesn't work, as the the prints are still printed on window 1.

    Code:
    if (State == State.SetDefaults)
    {
         PrintTo = PrintTo.OutputTab2

    #2
    Hello itrader46,

    Thanks for your post.

    Here is an example you can replicate that demonstrates sending the Print to OutputTab2.

    Code:
            protected override void OnStateChange()
            {
                if (State == State.SetDefaults)
                {
                    Description                                    = @"Enter the description for your new custom Indicator here.";
                    Name                                        = "PrintToExample";
                    Calculate                                    = Calculate.OnBarClose;
                    IsOverlay                                    = true;
                    DisplayInDataBox                            = true;
                    DrawOnPricePanel                            = true;
                    DrawHorizontalGridLines                        = true;
                    DrawVerticalGridLines                        = true;
                    PaintPriceMarkers                            = true;
                    ScaleJustification                            = NinjaTrader.Gui.Chart.ScaleJustification.Right;
                    //Disable this property if your indicator requires custom values that cumulate with each new market data event. 
                    //See Help Guide for additional information.
                    IsSuspendedWhileInactive                    = true;
    
                    PrintTo                                     = PrintTo.OutputTab2;
                }
                else if (State == State.Configure)
                {
                }
            }
    
            protected override void OnBarUpdate()
            {            
                Print (Time[0]+"  CB: "+CurrentBar);                
            }

    Comment


      #3
      I removed the indicator and reapplied it, then it worked. First time I only refreshed it with F5 and didn't work

      Comment


        #4
        Originally posted by itrader46 View Post
        I removed the indicator and reapplied it, then it worked. First time I only refreshed it with F5 and didn't work
        Remember it. It is important. It has messed me up a number of times. Usually if you change an internal NT parameter in SetDefaults, you will have to remove the indicator, and then add it back, for the change to take effect.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        647 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        368 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        108 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        571 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        573 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X