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 CaptainJack, 05-29-2026, 05:09 AM
|
0 responses
310 views
0 likes
|
Last Post
by CaptainJack
05-29-2026, 05:09 AM
|
||
|
Started by CaptainJack, 05-29-2026, 12:02 AM
|
0 responses
200 views
0 likes
|
Last Post
by CaptainJack
05-29-2026, 12:02 AM
|
||
|
Started by charlesugo_1, 05-26-2026, 05:03 PM
|
0 responses
186 views
1 like
|
Last Post
by charlesugo_1
05-26-2026, 05:03 PM
|
||
|
Started by DannyP96, 05-18-2026, 02:38 PM
|
1 response
278 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
229 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|

Comment