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 GwFutures1988, Today, 02:48 PM
      1 response
      5 views
      0 likes
      Last Post NinjaTrader_Clayton  
      Started by ScottWalsh, 04-16-2024, 04:29 PM
      6 responses
      30 views
      0 likes
      Last Post ScottWalsh  
      Started by frankthearm, Today, 09:08 AM
      10 responses
      36 views
      0 likes
      Last Post frankthearm  
      Started by mmenigma, Today, 02:22 PM
      1 response
      3 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by NRITV, Today, 01:15 PM
      2 responses
      9 views
      0 likes
      Last Post NRITV
      by NRITV
       
      Working...
      X