Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

recursive parameter error

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

    recursive parameter error

    i


    am not sure why i get a recursive parameter error when i am trying to compile this. appreciate any help


    #region Properties
    [Description("")]
    [Category("Parameters")]
    publicdouble Stop1
    {
    get { return stop1; }
    set { stop1 = Math.Max(1, value); }
    }
    [Description("")]
    [Category("Parameters")]
    publicdouble Stop2
    {
    get { return stop2; }
    set { stop2 = Math.Max(1, value); }
    }
    [Description("")]
    [Category("Parameters")]
    publicdouble stopPrice
    {
    get { return stopPrice; }
    set { stopPrice = Math.Max(1, value); }
    }
    #endregion

    #2
    You are getting this error because your public METHOD is the same as your VARIABLE.

    It looks like you created them correctly except for the last one.

    Code:
    [Description("")]
    [Category("Parameters")]
    public double stopPrice
    {
    get { return stopPrice; }
    set { stopPrice = Math.Max(1, value); }
    }
    mrlogik
    NinjaTrader Ecosystem Vendor - Purelogik Trading

    Comment


      #3
      For further clarification, your property should read:

      StopPrice instead of stopPrice (not the capitalization)
      RayNinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by cincai, Yesterday, 08:18 PM
      1 response
      11 views
      0 likes
      Last Post NinjaTrader_ChrisL  
      Started by kiffgj, Today, 04:23 AM
      0 responses
      10 views
      0 likes
      Last Post kiffgj
      by kiffgj
       
      Started by Lando Calrissian, Today, 07:30 AM
      1 response
      4 views
      0 likes
      Last Post NinjaTrader_BrandonH  
      Started by lismartin, Yesterday, 04:47 PM
      1 response
      15 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by facuevasm, Today, 07:28 AM
      3 responses
      13 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Working...
      X