Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Backtest Optimazation Rules?
Collapse
X
-
Backtest Optimazation Rules?
If I have a strategy that has 2 parameters, lets call them A & B both can range from 1 to 100 and I want to optimize, but A must always be greater than B, is there anyway I can stop the optimizer from even trying the tests that don't fit the criteria?Tags: None
-
Hello drumuk,
Thank you for your post and welcome to the NinjaTrader Support Forum!
When setting the value you can make sure it's the max of either the other value or it's own. For example: set { greater = Math.Max(lesser, value); }
Below is an example of how to set these properties:
Code:#region Variables private int greater = 20; private int lesser = 10; #endregion protected override void Initialize() { } protected override void OnBarUpdate() { } #region Properties [Description("")] [GridCategory("Parameters")] public int Lesser { get { return lesser; } set { lesser = Math.Max(1, value); } } [Description("")] [GridCategory("Parameters")] public int Greater { get { return greater; } set { greater = Math.Max(lesser, value); } } #endregion
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by itrader46, Today, 10:22 AM
|
0 responses
12 views
0 likes
|
Last Post
by itrader46
Today, 10:22 AM
|
||
Started by NM_eFe, Today, 10:13 AM
|
0 responses
3 views
0 likes
|
Last Post
by NM_eFe
Today, 10:13 AM
|
||
Started by hdge4u, Yesterday, 12:23 PM
|
1 response
10 views
0 likes
|
Last Post
by hdge4u
Today, 09:58 AM
|
||
Started by 1001111, Today, 09:45 AM
|
0 responses
11 views
0 likes
|
Last Post
by 1001111
Today, 09:45 AM
|
||
Started by DTSSTS, 01-28-2024, 12:07 PM
|
11 responses
559 views
0 likes
|
Last Post
by bmo111
Today, 09:34 AM
|
Comment