Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

newbie: Ninnja Trader Tutorial 2 problem

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

    newbie: Ninnja Trader Tutorial 2 problem

    NinjaScript Tutorial 2 in the help file says:

    Plots.Add(new Plot(Color.OrangeRed, PlotStyle.Line, "Plot0"));
    Period =10;

    In compiling, I get the following error:

    'System.Array' does not contain a definition for 'Add'

    Any suggestions?

    #2
    Hello Maxthink,

    Welcome to the NinjaTrader forums!

    I'm looking for the snippet you posted but have been unable to locate. Do you have the link or can provide more information on where it can be found?


    Add(new Plot(Color.OrangeRed, PlotStyle.Line, "Plot0"));

    Above is a complete statement. It belongs in the Initialize() method and doesn't need the Plots. before it

    If you have any variable declarations like Period = 10, these belong in the variables region.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      The problem code for me in the Ninja Trader tutorial is found at:

      Help - NinjaScript - Tutorial: Indicator on Indicator (Level 2) - Setup

      The first line in the area noted by number 2 produces the problem described in thread #1

      Comment


        #4
        Problem solved!

        In entering the tutorial code, if it didn't work ... I started a new NinjaScript code file under a new name.

        In the compiling phase, rather than reporting errors in the just the current code, the compiler reported errors in each of the non-working files. I missed that point.

        After I deleted the non-working scripts, the tutorial compiled and ran as desired.

        Comment


          #5
          Thanks for the update and glad to hear you have sorted it out. Looks like the screenshot has already been corrected in our version 7 documentation for this.

          Ryan M.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Rapine Heihei, Today, 08:19 PM
          1 response
          8 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by Rapine Heihei, Today, 08:25 PM
          0 responses
          6 views
          0 likes
          Last Post Rapine Heihei  
          Started by f.saeidi, Today, 08:01 PM
          1 response
          9 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by Rapine Heihei, Today, 07:51 PM
          0 responses
          8 views
          0 likes
          Last Post Rapine Heihei  
          Started by frslvr, 04-11-2024, 07:26 AM
          5 responses
          98 views
          1 like
          Last Post caryc123  
          Working...
          X