I've right clicked on a symbol, selected optimize, selected a custom strategy, and when I go to any of the strategy input parameters I don't see any place to set min/max/increment. In the SampleMACrossOver strategy I can see the min/max/increment options but I can't figure out how to get this in my custom strategy. Is there something I need to put in the strategy code to allow a step optimization?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Simple "Test Range" question
Collapse
X
-
Simple "Test Range" question
How do I set a "test range" for a simple optimization? Specifically, how do I set the min, max, and increment? The help file on the topic isn't helping.
I've right clicked on a symbol, selected optimize, selected a custom strategy, and when I go to any of the strategy input parameters I don't see any place to set min/max/increment. In the SampleMACrossOver strategy I can see the min/max/increment options but I can't figure out how to get this in my custom strategy. Is there something I need to put in the strategy code to allow a step optimization?Tags: None
-
bluelou, are you able to set the strategy input parameters during backtests? If not, then you will have to make the variables public. I've attached a screenshot of SampleMACrossover with the code necessary to make the 'Fast' variable public. The process is the same for other variable types, so if you had some double value you wished to make public, you would just have to replace 'double' in the code with 'int'.
In the screenshot, the variable is first declared in line 29 as a private variable (with a lowercase starting letter). Then from lines 61-67, the private variable is exposed as public (with a uppercase starting letter). The capitalization is important. After the variable is made public, you can then use it in your strategy/indicator and optimize it, like in lines 38, 41, 52, and 54.AustinNinjaTrader Customer Service
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by cre8able, 02-11-2023, 05:43 PM
|
3 responses
235 views
0 likes
|
Last Post
by rhubear
Today, 10:46 AM
|
||
Started by frslvr, 04-11-2024, 07:26 AM
|
8 responses
113 views
1 like
|
Last Post Today, 10:30 AM | ||
Started by stafe, 04-15-2024, 08:34 PM
|
10 responses
45 views
0 likes
|
Last Post
by stafe
Today, 10:29 AM
|
||
Started by rocketman7, Today, 09:41 AM
|
3 responses
11 views
0 likes
|
Last Post Today, 10:07 AM | ||
Started by traderqz, Today, 09:44 AM
|
2 responses
10 views
0 likes
|
Last Post Today, 10:00 AM |
Comment