Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Data Box - Display exposed ISeries<T>

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

    Data Box - Display exposed ISeries<T>

    NT Team,

    Noting NT8 - DisplayInDataBox (https://ninjatrader.com/support/help...yindatabox.htm) states that
    DisplayInDataBox determines
    if plot(s) display in the chart data box, is it possible to display exposed ISeries<boolean> (https://ninjatrader.com/support/help...iseriest.htm)?

    If possible I'd prefer to avoid creating transparent/invisible plots to achieve this goal. As referenced in NT Post - Displaying an indicator value in databox but not on chart or panel (https://ninjatrader.com/support/foru...chart-or-panel)

    #2
    Hello Shansen,

    Thanks for your post.

    Currently, only plots can display to the data box. The recommended solution would be to set DisplayTransparentPlotsInDataBox to true and use transparent plots to expose the values.

    AddPlot would be needed to tell NinjaTrader to display the Plot's Series<double> in the data box, and through testing, Transparent plots do not appear to effect the AutoScaling behavior. Could you elaborate on why DisplayTransparentPlotsInDataBox with the Plot's brush set to transparent is not an appropriate solution? I'd like to note your input in a feature request so we can track what you are trying to accomplish.

    ShowTransparentPlotsInDataBox - https://ninjatrader.com/support/help...sindatabox.htm

    I'll be happy to assist you further.

    Comment


      #3

      My Indicators are currently structured with multiple exposed ISeries<T>, where <T> is <bool> or <custom Enum>(https://ninjatrader.com/support/help...s/?seriest.htm).
      Please find attached an example Indictor, TestIsProcessed (it is for illustrative purposes only).
      A Strategy instantiates an Indicator and refers to the exposed values (e.g. _testIsProcessed.IsProcessed[0] == true).

      I do not believe the DisplayTransparentPlotsInDataBox is an appropriate solution because Plots are ISeries<double>, not <bool>.
      The ISeries values are exposed (i.e. accessible by Indicators and Strategies), it seems illogical to require the ISeries to be plotted to be displayed in the Data Box.

      Any assistance is appreciated.
      Attached Files
      Last edited by Shansen; 10-10-2018, 06:34 AM.

      Comment


        #4
        Thanks for the explanation and example, Shansen.

        I've noted your input in our feature request tracking system. The ticket ID for the ability to display Series<T> or other values that aren't plots in the data box is SFT-891.

        As a work around, you could use a Series<double> and then assign magic values for "true" and "false," and then you could use FormatPriceMarker to show that magic value as "True" or "False" in the data box. This isn't as ideal as using a Series<bool>, but should be able to get the job done.

        For example:
        Code:
        public override string FormatPriceMarker(double price)
        {
            if (price == 0)
                return "False";
            if (price == 1)
                return "True";
            else
                return price.ToString();
        }
        
        protected override void OnBarUpdate()
        {
            Value[0] = CurrentBar % 2 == 0 ? 1 : 0;
        }
        FormatPriceMarker - https://ninjatrader.com/support/help...ricemarker.htm

        If there is anything else I can do to help, please let me know.

        Comment


          #5
          Thanks for the suggestion of refactoring to ISeries<double>.
          I agree, it is not an ideal solution. It would require extensive refactoring of Indicators, hosting Indicators, and Strategies. All moving away from the benefits of a strongly typed language.

          Thank you for raising the ticket. With luck the change will be made in the near future (understanding the timing, if at all, is in the hands of your development team).
          Last edited by Shansen; 10-10-2018, 04:21 PM.

          Comment


            #6
            Jim, thanks again for this approach.

            Until SFT-891 is implemented, I'll push Bool Properies to transparent plots e.g. Values[0][0] = Convert.ToDouble(BoolProperty[0]);
            No joy with custom eNums, but it is a start.

            Thanks again!
            Last edited by Shansen; 10-13-2018, 08:31 PM.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            602 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            347 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            103 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            560 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            559 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X