![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| General Programming General NinjaScript programming questions. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Senior Member
Join Date: Aug 2009
Location: Chicago
Posts: 213
Thanks: 39
Thanked 4 times in 4 posts
|
I have a general question about how to project price movement forward.... just the method for scripting it I mean?
The projection could be either bars, or even lines, but I'm wondering what type of methods i could use for doing this? An example would be in the picture attached. |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,404
Thanks: 252
Thanked 974 times in 957 posts
|
forrestang, there would be unfortunately no dedicated method for futures bars plotting, you would need to custom code by drawing for example into the future, the draw object overloads would accept a future DateTime anchor as parameter.
Bertrand
NinjaTrader Customer Service |
|
|
|
|
The following user says thank you to NinjaTrader_Bertrand for this post: |
|
|
|
#3 |
|
Senior Member
Join Date: Aug 2009
Location: Chicago
Posts: 213
Thanks: 39
Thanked 4 times in 4 posts
|
Are you saying the only way would be to use one of those plot void overide functions? I.e. the custom plotting that isn't supported by NT?
|
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,404
Thanks: 252
Thanked 974 times in 957 posts
|
That would be an option as well, but I was referring to using the Draw Methods (DrawLine, Dot, Ray etc) to construct your forecast, those take a future DateTime input to draw at.
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#5 | |
|
Senior Member
Join Date: Aug 2009
Location: Chicago
Posts: 213
Thanks: 39
Thanked 4 times in 4 posts
|
Quote:
Or do you literally mean as suggested, and use say for example using: Code:
DrawLine(string tag, bool autoScale, DateTime startTime, double startY, DateTime endTime, double endY, Color color, DashStyle dashStyle, int width) |
|
|
|
|
|
|
#6 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,404
Thanks: 252
Thanked 974 times in 957 posts
|
Unfortunately using a negative index in the plots would not be supported by us - the most current bar is at 0, which is the rightmost bar...
Correct, you would supply a future timestamp to draw at, which would be known for time based bar types. You know the time of the CurrentBar (Time[0]) so you can add 5 minutes to that if you're running a 5 min chart for example...
Bertrand
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How Count bars and time forward | fawaz79 | Charting | 2 | 03-21-2011 04:50 AM |
| Tool for projecting / measuring moves | JoshDance | Charting | 4 | 02-19-2011 12:59 AM |
| is there a Bars.CurrentSession method? | WSquared | General Programming | 1 | 12-20-2010 02:14 PM |
| Projecting indicators into the future | anituchka | Charting | 4 | 09-24-2010 01:52 PM |
| Marking charts days forward from current price | shortstop | Charting | 3 | 07-20-2007 05:49 AM |