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 jaybedreamin, Today, 05:56 PM
      0 responses
      2 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
      1 view
      0 likes
      Last Post Jon17
      by Jon17
       
      Started by Javierw.ok, Today, 04:12 PM
      0 responses
      6 views
      0 likes
      Last Post Javierw.ok  
      Started by timmbbo, Today, 08:59 AM
      2 responses
      10 views
      0 likes
      Last Post bltdavid  
      Working...
      X