Thanks.
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
DrawLine into the future
Collapse
X
-
DrawLine into the future
To draw a line into the future, one must supply a startTime and a endTime. Most of the time, for the first DrawLine, Time[0] will be the initial startTime. Now how does one go about calculating the endTime. If the Data Interval is 1-minute then calculating the endtime is rather simple - endTime = Time[0].AddMInute(1). But what do you due when the Data Interval is Tick, Volume, Range, etc.? The x-axis is not fixed like for a minute chart. The x-axis scale is not fixed for a Tick chart. Does one have to worry about screwing up the x-axis when drawing into the future. When drawing into the future on a variable x-axis is the calculation for endTime just as simple as for a minute chart? In other words, one can use endTime = Time[0].AddMinute(1) for all Data Intervals.
Thanks.Tags: None
-
Originally posted by scjohn View PostTo draw a line into the future, one must supply a startTime and a endTime. Most of the time, for the first DrawLine, Time[0] will be the initial startTime. Now how does one go about calculating the endTime. If the Data Interval is 1-minute then calculating the endtime is rather simple - endTime = Time[0].AddMInute(1). But what do you due when the Data Interval is Tick, Volume, Range, etc.? The x-axis is not fixed like for a minute chart. The x-axis scale is not fixed for a Tick chart. Does one have to worry about screwing up the x-axis when drawing into the future. When drawing into the future on a variable x-axis is the calculation for endTime just as simple as for a minute chart? In other words, one can use endTime = Time[0].AddMinute(1) for all Data Intervals.
Thanks.
Code:DrawLine(string tag, bool autoScale, DateTime startTime, double startY, DateTime endTime, double endY, Color color, DashStyle dashStyle, int width);
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by PhillT, 04-19-2024, 02:16 PM
|
4 responses
35 views
0 likes
|
Last Post
by PhillT
Today, 04:24 PM
|
||
Started by ageeholdings, 05-01-2024, 05:22 AM
|
5 responses
37 views
0 likes
|
Last Post
by ageeholdings
Today, 03:21 PM
|
||
Started by reynoldsn, Today, 02:34 PM
|
0 responses
13 views
0 likes
|
Last Post
by reynoldsn
Today, 02:34 PM
|
||
Started by nightstalker, Today, 02:05 PM
|
0 responses
20 views
0 likes
|
Last Post
by nightstalker
Today, 02:05 PM
|
||
Started by llanqui, Yesterday, 09:59 AM
|
8 responses
32 views
0 likes
|
Last Post
by llanqui
Today, 01:57 PM
|
Comment