Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Error compiling I cannot figure out

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

    Error compiling I cannot figure out

    [Description("")]
    [GridCategory("Parameters")]
    public bool BE2
    {
    get { return be2; }
    set { be2 = value; }
    }
    #endregion
    }
    }

    I am every new to this:

    This simple piece of code returns three separate { or ; expected errors

    and...

    the entire strategy has 128 lines of code yet there are tons of errors listed in lines 133-150 which to my knowledge don't exist.

    Anyone have an idea?

    Incidentally that bool statement refers to this:

    if (be2 && Low[0] < Position.AvgPrice - ((Target1 + Target2)*TickSize))
    SetStopLoss("target2", CalculationMode.Price, Position.AvgPrice, false);

    Not sure if that makes a difference
    Last edited by jtradr; 01-13-2011, 08:21 PM. Reason: add something

    #2
    I resolved this.

    The errors were generated from NT labeling code lines in other files not in use as errors in this code. I don't know how that happened but I had to delete the other files to get NT to stop looking in those files for errors.

    Comment


      #3
      Great you got it resolved - all NinjaScript files (indicators and strategies) are compiled into one assembly file for high performance runtime use...thus all of them have to be 100% error free to proceed, so it can happen that you see compile errors listed for files other than the current one being edited.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      648 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      369 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      108 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      572 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      573 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X