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:
    [SIZE=2][FONT=Courier New][Description([/FONT][/SIZE][FONT=Courier New][SIZE=2][COLOR=#800000]""[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2])][/SIZE][/FONT]
    [SIZE=2][FONT=Courier New][Category([/FONT][/SIZE][FONT=Courier New][SIZE=2][COLOR=#800000]"Parameters"[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2])][/SIZE][/FONT]
    [FONT=Courier New][SIZE=2][COLOR=#0000ff]public [/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff]double[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2] [COLOR=Red]stopPrice[/COLOR][/SIZE][/FONT]
    [SIZE=2][FONT=Courier New]{[/FONT][/SIZE]
    [FONT=Courier New][SIZE=2][COLOR=#0000ff]get[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2] { [/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff]return[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2] [COLOR=Red]stopPrice[/COLOR]; }[/SIZE][/FONT]
    [FONT=Courier New][SIZE=2][COLOR=#0000ff]set[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2] { [COLOR=Red]stopPrice [/COLOR]= Math.Max([/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080]1[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2], value); }[/SIZE][/FONT]
    [SIZE=2][FONT=Courier New]}[/FONT][/SIZE]
    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 CaptainJack, 05-29-2026, 05:09 AM
      0 responses
      213 views
      0 likes
      Last Post CaptainJack  
      Started by CaptainJack, 05-29-2026, 12:02 AM
      0 responses
      125 views
      0 likes
      Last Post CaptainJack  
      Started by charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      145 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      228 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      189 views
      0 likes
      Last Post CarlTrading  
      Working...
      X