Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Start/End of day plot
Collapse
X
-
Could you please elaborate on what you mean exactly. By default it will plot all of the days data. This means if data starts coming in at midnight (00:00) it will start plotting there and if the data ends for the day in 24 hrs (24:00) it will stop that days data there and start a new days data at 00:00. Does that make sense?
By default it will not truncate any of the data from being displayed.Josh P.NinjaTrader Customer Service
-
Perhaps what you could do is something like this
http://www.ninjatrader-support.com/H...V6/ToTime.htmlCode:if (ToTime(Time[0]) == 93000 || ToTime(Time[0]) == 161500) DrawVerticalLine("Market Session" + CurrentBar, 0, Color.Black, DashStyle.Dash, 2);
Josh P.NinjaTrader Customer Service
Comment
-
You might try my TimeScale indicator, which displays the time and date by a red vertical line every hour, and gives the screen a slight background tint during trading hours.
I hadn't posted this before because it needs work for certain intervals. But here it is in case anyone finds it useful.
I put it up when I'm trying to look over a lot of backtest data and can't find which day is which, and it does that pretty well.
You might have to turn off the hourly bars, as sometimes they display the times over what you're looking at, and this is done by setting "DateOnly".
Hope this helps.
KBJAttached Files
Comment
-
Finally figured it out
I know this is an old thread, but for others that are searching: Below is some simple code to draw something at a given time of day, everyday.
if (Bars.FirstBarOfSession == true)
{
DateTime myTime = DateTime.Parse((Time[0]).ToString("d") + " 9:30 AM");
DrawVerticalLine("myTime" + CurrentBar, myTime, Color.Blue, DashStyle.Dash, 2);
Print(myTime);
}
Just replace " 9:30 AM" with whatever time you want to draw the object, making sure to include a space before the hour numeral.
The print output should look like this: 6/28/2011 9:30:00 AM
Comment
-
I want to use 10 AM to draw fibonacci line. In this case would I still leaveOriginally posted by motownlucas View PostI know this is an old thread, but for others that are searching: Below is some simple code to draw something at a given time of day, everyday.
if (Bars.FirstBarOfSession == true)
{
DateTime myTime = DateTime.Parse((Time[0]).ToString("d") + " 9:30 AM");
DrawVerticalLine("myTime" + CurrentBar, myTime, Color.Blue, DashStyle.Dash, 2);
Print(myTime);
}
Just replace " 9:30 AM" with whatever time you want to draw the object, making sure to include a space before the hour numeral.
The print output should look like this: 6/28/2011 9:30:00 AM
(Bars.FirstBarOfSession == true) or something different as the IF() statement?
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
574 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
333 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
553 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
551 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment