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
minutes
Collapse
X
-
minutes
hi ... i need to identify certain time periods on a chart regardless of the type of chart i'm running (min, tick, range, etc). I want to do this by identifying the 'minutes' from the system time. Can you guide me to a reference where it shows how to parse the system time so I can isolate the minutes? Thanks!Tags: None
-
Pman777,
This code example should work for what you are looking for -
Code:DateTime test = DateTime.Now; DateTime dateValue = new DateTime(test.Year, test.Month, test.Day, test.Hour + 1, 0, 0); TimeSpan barsAgo = dateValue - Time[0]; Print(barsAgo.ToString());
Cal H.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Ashkam, 04-29-2024, 09:28 AM
|
4 responses
43 views
0 likes
|
Last Post
by Ashkam
Today, 02:38 PM
|
||
Started by nightstalker, Yesterday, 02:05 PM
|
1 response
29 views
0 likes
|
Last Post Today, 02:16 PM | ||
Started by dcriador, Today, 02:09 PM
|
0 responses
5 views
0 likes
|
Last Post
by dcriador
Today, 02:09 PM
|
||
Started by nicthe, Today, 07:38 AM
|
4 responses
22 views
0 likes
|
Last Post
by bltdavid
Today, 01:58 PM
|
||
Decrease the size of the RegionHIghLightY on each tick when the price touches it
by cmtjoancolmenero
Started by cmtjoancolmenero, 04-29-2024, 03:40 PM
|
30 responses
98 views
0 likes
|
Last Post Today, 01:53 PM |
Comment