Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

AddChartIndicator

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

    AddChartIndicator

    I get an error when I tried to use the AddChartIndicator()

    I followed the method described in:

    https://ninjatrader.com/support/help...8/?seriest.htm

    please see the attached picture...If I comment out the line 65, it compiles without error


    #2
    Hello Mangaldoiya,

    Thanks for your post.

    AddChartIndicator() method is only available for strategies and this is why in the indicator you are getting the error message that AddChartIndicator does not exist in the current context (indicator).
    Reference: https://ninjatrader.com/support/help...tindicator.htm

    To accomplish your goal of plotting the SMA(200) in your indicator, you would need to add another plot using AddPlot() in the indicator.
    Reference: https://ninjatrader.com/support/help...8/?addplot.htm

    You would also need to create the output for the plot in #Region Properties.

    In the OnBarUpdate() you would need to assign the SMA(200)[0] value to the plot.
    Paul H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by tkaboris, Today, 05:13 PM
    0 responses
    2 views
    0 likes
    Last Post tkaboris  
    Started by GussJ, 03-04-2020, 03:11 PM
    16 responses
    3,281 views
    0 likes
    Last Post Leafcutter  
    Started by WHICKED, Today, 12:45 PM
    2 responses
    19 views
    0 likes
    Last Post WHICKED
    by WHICKED
     
    Started by Tim-c, Today, 02:10 PM
    1 response
    9 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by Taddypole, Today, 02:47 PM
    0 responses
    5 views
    0 likes
    Last Post Taddypole  
    Working...
    X