Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Beta bug? Strategy Analyzer backtest properties window showing wrong properties

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

    Beta bug? Strategy Analyzer backtest properties window showing wrong properties

    I didn't find another reference to this, apologies if already posted.

    When backtesting against an instrument (ex. USDJPY), and selecting a strategy *other than the first default one in the properties window* the user defined properties do not change to match the selected strategy, they stay as the properties that go with the default strategy. Not clear what values are actually used when it runs.

    In case this is useful info, the strategy I've selected is one that I exported from v6 and imported into v6.5_8. The properties that don't work right have been edited in code (added by the wizard originally, but edited). This might suggest an obvious code problem, however, the properties have worked in v6.

    Code for properties:

    variables region
    privatebool noEntries = false; // Used to prevent entries on Mondays and Fridays and after hours
    privatedouble trailingSLPercent = .05;
    privatedouble profitTarget = 250;
    privatedouble stopLoss = 25;
    privateint reversalPeriod = 1;
    privatedouble maxPositionProfit = 0;
    privatedouble currentPositionProfit = 0;

    property procedure region
    [Description("Trailing stoploss percent")]
    [Category(
    "Parameters")]
    publicdouble TrailingSLPercent
    {
    get { return trailingSLPercent; }
    set { trailingSLPercent = Math.Max(.05, value); }
    }
    [Description(
    "Position profit target")]
    [Category(
    "Parameters")]
    publicdouble ProfitTarget
    {
    get { return profitTarget; }
    set { profitTarget = Math.Max(1, value); }
    }
    [Description(
    "Position stoploss")]
    [Category(
    "Parameters")]
    publicdouble StopLoss
    {
    get { return stopLoss; }
    set { stopLoss = Math.Max(1, value); }
    }
    [Description(
    "ReversalPeriod")]
    [Category(
    "Parameters")]
    publicint ReversalPeriod
    {
    get { return reversalPeriod; }
    set { reversalPeriod = Math.Max(1, value); }
    }



    #2
    This is a limitation of the strategy dialogue window. To work around this, name input variables with unique names.
    RayNinjaTrader Customer Service

    Comment


      #3
      Ah, ok. Thanks for the response. Sounds like I can just create unique names across strategies.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by kevinenergy, 02-17-2023, 12:42 PM
      115 responses
      2,699 views
      1 like
      Last Post kevinenergy  
      Started by prdecast, Today, 06:07 AM
      1 response
      4 views
      0 likes
      Last Post NinjaTrader_LuisH  
      Started by Christopher_R, Today, 12:29 AM
      1 response
      14 views
      0 likes
      Last Post NinjaTrader_LuisH  
      Started by chartchart, 05-19-2021, 04:14 PM
      3 responses
      577 views
      1 like
      Last Post NinjaTrader_Gaby  
      Started by bsbisme, Yesterday, 02:08 PM
      1 response
      15 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Working...
      X