Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
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.
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:
Code:if (ToTime(Time[0]) >= MyTime ) { // Strategy logic goes here }
JesseNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by NRITV, Today, 01:15 PM
|
2 responses
6 views
0 likes
|
Last Post
by NRITV
Today, 01:51 PM
|
||
Started by frankthearm, Today, 09:08 AM
|
7 responses
31 views
0 likes
|
Last Post Today, 01:30 PM | ||
Started by maybeimnotrader, Yesterday, 05:46 PM
|
5 responses
26 views
0 likes
|
Last Post Today, 01:19 PM | ||
Started by quantismo, Yesterday, 05:13 PM
|
2 responses
19 views
0 likes
|
Last Post
by quantismo
Today, 01:07 PM
|
||
Started by adeelshahzad, Today, 03:54 AM
|
5 responses
33 views
0 likes
|
Last Post Today, 11:29 AM |
Comment