Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Properties Value Not Updating

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

    Properties Value Not Updating

    Hello

    I have set in my Properties a few values that are supposed to take a percentage and multiply them by the candle size and that will then determine entry, stop and profit target. They are to be user defined values.

    I am running into an issue with it.

    When I do a backtest and change the values, only one of the 3 values are changing.

    Here is the properties code, and then I will further specify my issue:

    Code:
    		[Description("Entry%")]
    		[GridCategory("Parameters")]
    		public double PercToEnter
    		{
    			get { return EntryPerc; }
    			set { EntryPerc = Math.Max(0.010, value);}
    		}
    		
    		[Description("Target%")]
    		[GridCategory("Parameters")]
    		public double PercToTarget
    		{
    			get { return TargetPerc; }
    			set { TargetPerc = Math.Max(0.010, value);}
    		}
    		
    		[Description("Stop%")]
    		[GridCategory("Parameters")]
    		public double PercToStop
    		{
    			get { return StopPerc; }
    			set { TargetPerc = Math.Max(0.010, value);}
    		}
    Whenever I change the Entry% in the user settings on a backtest, it works fine. It always changes the percentage when I later look on the settings tab. But the Stop% and the Target% always stay at the exact same value - not matter what I change them to.

    Are you able to see what the error is in my code?

    Thank you very much!

    #2
    jg123, the last one looks definitely bugged in the way it's setup, here you get the StopPerc but then set TargetPerc...

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    59 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    143 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    161 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    97 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    283 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Working...
    X