And do I need to know any tricks to make a Strategy Parameter of that type?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Time type and parameter
Collapse
X
-
Hi dbooksta,
ToTime() returns an integer.
You can read about this in the help guide under ToTime().
http://www.ninjatrader.com/support/h...nt7/totime.htm
For an example of how to make a public int, take a look at the #region Properties of the SMA indicator (Tools -> Edit NinjaScript -> Indicator... -> SMA -> OK).Chelsea B.NinjaTrader Customer Service
-
dbooksta, as alternative you could also look into C# directly for this purpose via a TimeSpan user input - for example something like -
Code:[XmlIgnore] [Description("RTH StartTime")] [GridCategory("RTH Parameters")] public TimeSpan RTHStart { get { return rthStart; } set { rthStart = value; } } [Browsable(false)] public string RTHStartSerialize { get { return rthStart.ToString(); } set { rthStart = TimeSpan.Parse(value); } }
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Hwop38, 05-04-2026, 07:02 PM
|
0 responses
163 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|
||
|
Started by CaptainJack, 04-24-2026, 11:07 PM
|
0 responses
314 views
0 likes
|
Last Post
by CaptainJack
04-24-2026, 11:07 PM
|
||
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
245 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
350 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
179 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|

Comment