Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Displaying an Indicator in the Data Box

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

    Displaying an Indicator in the Data Box

    Hello

    I created a very simple Indicator that prints the Slope of the 5 SMA to the Output Window. In the "Parameters" menu of the Indicator I set "Display in Data Box" to true, but the Data Box doesn't display the indicator. Could someone please tell me what I'm missing here? Thanks a lot.


    public class SlopePrint : Indicator
    {
    #region Variables
    // Wizard generated variables
    private int myInput0 = 1; // Default setting for MyInput0
    // User defined variables (add any user defined variables below)
    #endregion

    /// <summary>
    /// This method is used to configure the indicator and is called once before any bar data is loaded.
    /// </summary>
    protected override void Initialize()
    {

    }

    /// <summary>
    /// Called on each bar update event (incoming tick)
    /// </summary>
    protected override void OnBarUpdate()
    {
    Print(Slope(SMA(5), 3, 0));
    }
    Last edited by laocoon; 11-19-2010, 08:29 AM.

    #2
    laocoon, Prints would not make it to the DataBox - only plots would be displayed.

    Comment


      #3
      Bertrand,

      Thanks for your reply. I made the necessary modifications (Indicator now has a plot and everything works fine.) I have another question however: I don't want the plot to be visible on the chart, I only need to access its values in the Data Box. In order to do that, I made the indicator appear on the same panel as another indicator (to save screen real estate) and selected "transparent" as plot color. This works OK, except that now the values are also displayed in "transparent" in the Data Box and I thus cannot see them. This doesn't seem logical as I can imagine many situations where you don't want to see an indicator on the chart but still need to access its values in the Data Box. How can I achieve that?

      Thanks again.

      Comment


        #4
        Hello laocoon,

        Transparent wouldn't work then for this purspose because, as you note, the data box is also transparent.

        You can set the indicator color as the same color as the chart background. This should let you view in data box and not see the visual plot.
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          Works great, hadn't thought of that. Thanks, RyanM.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          571 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          331 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
          549 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          549 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X