Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).
I've been looking at NinjaTrader for a very long time especially because I wanted to program
my own calculations and methods. Since i do a lot of Cycle and Planetary analysis i need
to plot a line into the future e.g. behind the last plotted bar to do visual analysis.
I heard for a long time that it was not possible to plot into the future till recently i heard
about overiding the Plot() method and do a custom plot.
There are some good examples from Ninja on that and a good Ichimoku example from this forum. Custom Drawing
This works pretty well but i wasn't able to get the cursor to show future dates. Also
plotting in an indicator pane had some drawbacks.
When working with the MS Chart component in Visual Studio i added bars to the bars series
to be able to plot into the future.
I tried this with NinjaTrader and to my surprise this works quite well and you are able to
see the values on the future x-axis as well.
The basic concept is to add filler bars to the Bar array with the high,low etc all the same price
and then because the bar is a line, by giving the high, low etc the same value,
make the future bars invisible by
CandleOutlineColor = Color.Transparent;
In OnTerminate() you can do some clean up if you want and delete the extra bars.
I made an example indicator as proof of concept. As this is my first ever NinjaTrader coding
it might still be a bit rough.
This indicator only works on Daily charts but my testing showed the current concept also works
on weekly and monthly. With some adaptions intraday will be possible as well.
The chart shows the indicator in action and this will open up a lot of possibilities i think.
Hope we can bring this implementation to a 1.0 version with all the knowledgable people in this forum.
Attached is a picture of a Planetary Indicator i'm working on that shows how usefull the concept can be.
When finished it will be posted here as well.
The following 17 users say Thank You to ehlaban for this post:
Thanks a bunch. This is certainly a great method. It will be very useful for plotting time-related future events and formulas (calendars, cyclical events, seasonal tendencies, behavioral outcomes, possibly AI, etc.).
I contacted NinjaTrader on this limitation and they said that it is not possible in the current code. Then, I mentioned to them the example of Ichimoku and they went quiet and said it will be placed on the improvements list. What do they know?
It would be nice when your method is capable of plotting future events for any time frame.
Keep up the good work!
The following 4 users say Thank You to aligator for this post:
I just noticed that the major problem with NT7 is that the cursor will not function (show time) on X-axis beyond the current time and into future. If they (NT) can just make this simple fix for cursor to be responsive beyond the current time, plotting into future needs no special coding.
I plotted your indicator first on a daily chart, then when I dropped any other time-related indicator the output for my indicator was also calculated and shown in the future. The issue is the NT cursor.
Currently, in Ninja, while you can scroll the chart into future the cursor will only show the current time. And, as you know that is the issue.
My current fix is to plot your indicator first, hide it, and then drop my other indicators - and it rocks. All is needed now is to be able to plot in intraday time frames down to minutes (perhaps seconds).
Thank you for pointing out this feature. True, if equidistant bar spacing is set to false the cursor will show future times. However, any future event related indicator such as a news calendar will not plot into the future because there are no filler bars as provided by @ehlaban's Future Plot indicator.
It is a unfortunate that @ehlaban is no longer able to make the needed improvements to include hrs, minutes, and seconds to his indicator and make it useful for intraday charts.
Hopefully, some maverick coders here would take the challenge and volunteer to do these improvements to the code.
It is unreal that NT Support would not do this much needed future plotting capability like most other vendors having it as standard in their charting packages. The anticipated Version 8 seems to be basically a beautification of Version 7, so far as we have heard. Improvements seem to be in DOM and order execution areas. Nothing on charting has been shared.
Keeping fingers crossed.
The following user says Thank You to aligator for this post: