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 Mindset, 04-21-2026, 06:46 AM
|
0 responses
94 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
140 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
68 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|
||
|
Started by cmoran13, 04-16-2026, 01:02 PM
|
0 responses
125 views
0 likes
|
Last Post
by cmoran13
04-16-2026, 01:02 PM
|
||
|
Started by PaulMohn, 04-10-2026, 11:11 AM
|
0 responses
74 views
0 likes
|
Last Post
by PaulMohn
04-10-2026, 11:11 AM
|

Comment