Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.
    JimNinjaTrader Customer Service

    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.
        JimNinjaTrader Customer Service

        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 bortz, 11-06-2023, 08:04 AM
            47 responses
            1,605 views
            0 likes
            Last Post aligator  
            Started by jaybedreamin, Today, 05:56 PM
            0 responses
            8 views
            0 likes
            Last Post jaybedreamin  
            Started by DJ888, 04-16-2024, 06:09 PM
            6 responses
            18 views
            0 likes
            Last Post DJ888
            by DJ888
             
            Started by Jon17, Today, 04:33 PM
            0 responses
            4 views
            0 likes
            Last Post Jon17
            by Jon17
             
            Started by Javierw.ok, Today, 04:12 PM
            0 responses
            13 views
            0 likes
            Last Post Javierw.ok  
            Working...
            X