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 CarlTrading, 03-31-2026, 09:41 PM
|
1 response
43 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
21 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
30 views
1 like
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
50 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
40 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment