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

AddChartIndicator() Method from an Indicator()

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

    AddChartIndicator() Method from an Indicator()

    I love the AddChartIndicator() method on the StrategyRenderBase class for displaying indicators associated to the strategy without having to separately add the Indicator to the Chart, and make sure all the settings are the same.

    Is there any "unsupported" way to use this via an Indicator?

    When coding indicators that depend on other indicators, it is necessary to add the other indicators manually to the chart in order to visualise the other indicators while developing, The alternative being to re implement the rendering/plotting which often is unnecessary when you need only the values of an indicator and not the visuals (aside from when developing).

    Adding these indicators manually to the chart is error prone, as I often I find I'm getting unexpected results, and then realise that the settings for the indicator I'm developing are out-of-sync with the setttings added to the chart. For example, I've added EMA20 to the chart, but I'm using EMA9 on the indicator.

    Is there any way to use AddChartIndiator, either via reflection, or casting or some other unsupported way? If not, may I request that exposing the AddChartIndicator for indicators be considered as a new feature in a future release?

    #2
    Hello,

    Thank you for posting.

    Currently, I am unaware of any way to utilize this method from an Indicator specifically, but I will put in a feature request for this because as you noted recreating plotting logic can be tedious or error prone.

    I will put a question to development as well to see if there would be any reasonable way to accomplish this using NinjaScript as it is currently. If I have further details on that I will post back here.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Thanks Jesse by the way I'm on NT8 - I posted this in the wrong section

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Mestor, 03-10-2023, 01:50 AM
      16 responses
      388 views
      0 likes
      Last Post z.franck  
      Started by rtwave, 04-12-2024, 09:30 AM
      4 responses
      31 views
      0 likes
      Last Post rtwave
      by rtwave
       
      Started by yertle, Yesterday, 08:38 AM
      7 responses
      29 views
      0 likes
      Last Post yertle
      by yertle
       
      Started by bmartz, 03-12-2024, 06:12 AM
      2 responses
      22 views
      0 likes
      Last Post bmartz
      by bmartz
       
      Started by funk10101, Today, 12:02 AM
      0 responses
      7 views
      0 likes
      Last Post funk10101  
      Working...
      X