Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ADXVMA error

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

    ADXVMA error

    Hi,

    I am working on developing an ADXVMA strategy. I am using code from the ADXVMA to create the strategy. The following code throws an error, can you tell me why?

    Add(new Plot(Color.Gray, PlotStyle.Line, "ADXVMA"));

    It is throwing the following error:

    The best overloaded method match for 'NinjaTrader.Strategy.StrategyBase.Add(NinjaTrader .Indicator.IndicatorBase)' has some invalid arguments
    Argument '1': cannot convert from 'NinjaTrader.Gui.Chart.Plot' to 'NinjaTrader.Indicator.IndicatorBase'

    Thank You.

    #2
    Before replying, I would like to further discuss this privately. Can we start a private chat?

    Comment


      #3
      Hello,

      Thank you for the question.

      Yes we can chat privately, please send questions you do not want on the forum to: platform support @ ninjatrader .com


      To answer your question, this error specifically deals with Strategies.

      In an Indicator, you can use Add() to add Plots, Indicators, or DataSeries.

      In a Strategy, you can use Add() to add Indicators, or DataSeries but not a Plot.

      The error you are getting is because you are adding a plot to a strategy which will not work.

      If you are trying to plot from a strategy, you can either add a Indicator that does the plotting based on your calculations in that indicator, or you can view this example :
      When running a strategy on a chart you may find the need to plot values onto a chart. If these values are internal strategy calculations that are difficult to migrate to an indicator, you can use the following technique to achieve a plot. NinjaTrader 8 With NinjaTrader 8 we introduced strategy plots which provide the ability


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

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by kulwinder73, Today, 10:31 AM
      1 response
      8 views
      0 likes
      Last Post NinjaTrader_Erick  
      Started by RookieTrader, Today, 09:37 AM
      3 responses
      15 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by terofs, Yesterday, 04:18 PM
      1 response
      24 views
      0 likes
      Last Post terofs
      by terofs
       
      Started by CommonWhale, Today, 09:55 AM
      1 response
      6 views
      0 likes
      Last Post NinjaTrader_Erick  
      Started by Gerik, Today, 09:40 AM
      2 responses
      8 views
      0 likes
      Last Post Gerik
      by Gerik
       
      Working...
      X