ww58
- ago
The following code causes software to hang when clicking on Optimize button

CODE:
using WealthLab.TASC; using WealthLab.Backtest; using System; using System.Linq; using System.Drawing; using System.IO; using WealthLab.Core; using WealthLab.Data; using WealthLab.Indicators; using System.Collections.Generic; using Newtonsoft.Json.Linq; namespace WealthScript1 {    public class MyStrategy : UserStrategyBase    {       public MyStrategy() : base()       {          AddParameter("Check bar", ParameterType.Int32, 0);          AddParameter("Min Level Points", ParameterType.Int32, 3, 1, 10, 1);          AddParameter("Bars Ago", ParameterType.Int32, 8, 0, 60, 2);          AddParameter("Limit", ParameterType.Int32, 1, 0, 5, 1);          AddParameter("Stop Loss", ParameterType.Double, 80, 10, 100, 10);          AddParameter("Profit Target", ParameterType.Double, 250, 10, 300, 10);          AddParameter("ATR %", ParameterType.Double, 1, 0, 5, 0.5);          AddParameter("Check %", ParameterType.Double, 3, 1, 4, 0.5);          AddParameter("Signal Limit", ParameterType.Int32, 1, 1, 5, 1);       }       public override void Initialize(BarHistory bars) { }       public override void Execute(BarHistory bars, int idx) { }    } }
0
233
Solved
3 Replies

Reply

Bookmark

Sort
Glitch8
 ( 8.38% )
- ago
#1
Optimizable parameters needs start, stop, increment values. Here I fixed this for you,

CODE:
using WealthLab.TASC; using WealthLab.Backtest; using System; using System.Linq; using System.Drawing; using System.IO; using WealthLab.Core; using WealthLab.Data; using WealthLab.Indicators; using System.Collections.Generic; using Newtonsoft.Json.Linq; namespace WealthScript1 {    public class MyStrategy : UserStrategyBase    {       public MyStrategy() : base()       {          AddParameter("Check bar", ParameterType.Int32, 0, 1, 10, 1);          AddParameter("Min Level Points", ParameterType.Int32, 3, 1, 10, 1);          AddParameter("Bars Ago", ParameterType.Int32, 8, 0, 60, 2);          AddParameter("Limit", ParameterType.Int32, 1, 0, 5, 1);          AddParameter("Stop Loss", ParameterType.Double, 80, 10, 100, 10);          AddParameter("Profit Target", ParameterType.Double, 250, 10, 300, 10);          AddParameter("ATR %", ParameterType.Double, 1, 0, 5, 0.5);          AddParameter("Check %", ParameterType.Double, 3, 1, 4, 0.5);          AddParameter("Signal Limit", ParameterType.Int32, 1, 1, 5, 1);       }       public override void Initialize(BarHistory bars) { }       public override void Execute(BarHistory bars, int idx) { }    } }
1
Best Answer
ww58
- ago
#2
Thank you. I never cease to be amazed at the quality of support here
0
Glitch8
 ( 8.38% )
- ago
#3
Not a problem, and we'll work on handling that more gracefully in WL8 too!
0

Reply

Bookmark

Sort