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 Barry Milan, Today, 10:35 PM
      1 response
      8 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by WeyldFalcon, 12-10-2020, 06:48 PM
      14 responses
      1,428 views
      0 likes
      Last Post Handclap0241  
      Started by DJ888, Yesterday, 06:09 PM
      2 responses
      9 views
      0 likes
      Last Post DJ888
      by DJ888
       
      Started by jeronymite, 04-12-2024, 04:26 PM
      3 responses
      40 views
      0 likes
      Last Post jeronymite  
      Started by bill2023, Today, 08:51 AM
      2 responses
      16 views
      0 likes
      Last Post bill2023  
      Working...
      X