I am sure I am doing something wrong but:
When I originally programmed this I set period for xday_rocs to 26. Now when I graph xday_rocs the period always appears as 26 despite me having optimized to a different period. How do I correct that.

My defaults are set to 18 and 4
Thank you.
CODE:
using WealthLab.Backtest; using System; using WealthLab.Core; using WealthLab.Data; using WealthLab.Indicators; using System.Collections.Generic; namespace WealthScript1 { public class MyStrategy : UserStrategyBase { public MyStrategy() // This has to have the name of the class above { // In this instance I am not using this for anything AddParameter("Period 1", ParameterType.Int32, 18, 3, 30, 1); // Parameter index 0 AddParameter("MAX_ROC_int", ParameterType.Int32, 4, 3, 20, 1); // Parameter index 1 } //create indicators and other objects here, this is executed prior to the main trading loop public override void Initialize(BarHistory bars) { StartIndex = 100; BarHistory yh_TLT = GetHistory(bars,"TLT","Yahoo_ETF"); xday_rocs = ROC.Series(yh_TLT.Close,Parameters[0].AsInt); PlotIndicatorLine(xday_rocs, WLColor.Red); }
When I originally programmed this I set period for xday_rocs to 26. Now when I graph xday_rocs the period always appears as 26 despite me having optimized to a different period. How do I correct that.
My defaults are set to 18 and 4
Thank you.
Rename
Apparently you've "Saved these values as parameter defaults" or not showing the complete code. Copy/paste the code into a new S. window and Compile.
Your Response
Post
Edit Post
Login is required