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 JTizz, Today, 01:20 PM
      1 response
      4 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by omermirza, Today, 12:39 PM
      1 response
      11 views
      0 likes
      Last Post NinjaTrader_Jim  
      Started by mballagan, Today, 01:02 PM
      1 response
      5 views
      0 likes
      Last Post NinjaTrader_Kate  
      Started by larkmail, Today, 12:30 PM
      1 response
      6 views
      0 likes
      Last Post NinjaTrader_Kate  
      Started by Danila, Today, 11:08 AM
      1 response
      11 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Working...
      X