Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Strategy Analyzer Optimizing time
Collapse
X
-
Hello AaronKoRn,
NT-Roland is correct, the ToTime method can be used to make times into Int's. To expand on that, to make an optimization time property you would need a public int property in your script marked with the NinjaScriptProperty attribute.
That will give you the optimization parameter with min/max/increment selection.Code:[NinjaScriptProperty] public int MyTime { get; set; }
You could then enter the start time as the minimum (70000), the start time plus 240 (110000) as the maximum and 500 as the increment. It could then increment the time by X, for example 70000, 70500, 71000, 71500 etc.
In your code you could use that input to compare with ToTime on the Time object:
I look forward to being of further assistance.Code:if (ToTime(Time[0]) >= MyTime ) { // Strategy logic goes here }
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
577 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
334 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
553 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
551 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment