NexusFi: Find Your Edge


Home Menu

 





Future plot with NinjaTrader


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one aligator with 4 posts (6 thanks)
    2. looks_two ehlaban with 3 posts (17 thanks)
    3. looks_3 lOQl with 1 posts (1 thanks)
    4. looks_4 Suraj with 1 posts (0 thanks)
    1. trending_up 5,106 views
    2. thumb_up 24 thanks given
    3. group 9 followers
    1. forum 8 posts
    2. attach_file 4 attachments




 
Search this Thread

Future plot with NinjaTrader

  #1 (permalink)
 ehlaban 
Netherlands
 
Experience: Advanced
Platform: Ensign, Multicharts
Trading: SP500
Posts: 91 since Nov 2009
Thanks Given: 66
Thanks Received: 57



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
BarsArray[0].Add(
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.

Attached Thumbnails
Click image for larger version

Name:	ninja PI.png
Views:	424
Size:	47.9 KB
ID:	58779  
Attached Files
Elite Membership required to download: FuturePlot_v0.5.zip
Started this thread Reply With Quote
The following 17 users say Thank You to ehlaban for this post:

Can you help answer these questions
from other members on NexusFi?
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
ZombieSqueeze
Platforms and Indicators
NexusFi Journal Challenge - April 2024
Feedback and Announcements
Request for MACD with option to use different MAs for fa …
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Retail Trading As An Industry
67 thanks
Battlestations: Show us your trading desks!
48 thanks
NexusFi site changelog and issues/problem reporting
47 thanks
GFIs1 1 DAX trade per day journal
32 thanks
What percentage per day is possible? [Poll]
31 thanks

  #2 (permalink)
 
aligator's Avatar
 aligator 
Las Vegas, NV
Market Wizard
 
Experience: Advanced
Platform: Abacus, Slide Rule, HP-65
Trading: Futures, Stocks, Options
Posts: 3,614 since Aug 2010
Thanks Given: 1,071
Thanks Received: 5,988


ehlaban View Post
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.

@ehlaban,

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!

Thanks again.

Visit my NexusFi Trade Journal Reply With Quote
The following 4 users say Thank You to aligator for this post:
  #3 (permalink)
 
aligator's Avatar
 aligator 
Las Vegas, NV
Market Wizard
 
Experience: Advanced
Platform: Abacus, Slide Rule, HP-65
Trading: Futures, Stocks, Options
Posts: 3,614 since Aug 2010
Thanks Given: 1,071
Thanks Received: 5,988


@ehlaban,

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).

Thanks again!

Visit my NexusFi Trade Journal Reply With Quote
  #4 (permalink)
 ehlaban 
Netherlands
 
Experience: Advanced
Platform: Ensign, Multicharts
Trading: SP500
Posts: 91 since Nov 2009
Thanks Given: 66
Thanks Received: 57

I intend to make an upgrade without the plotting so you can use it as an add in, like you did,
to plot into the future with other indicators.

Started this thread Reply With Quote
  #5 (permalink)
 
aligator's Avatar
 aligator 
Las Vegas, NV
Market Wizard
 
Experience: Advanced
Platform: Abacus, Slide Rule, HP-65
Trading: Futures, Stocks, Options
Posts: 3,614 since Aug 2010
Thanks Given: 1,071
Thanks Received: 5,988


ehlaban View Post
I intend to make an upgrade without the plotting so you can use it as an add in, like you did,
to plot into the future with other indicators.

@ehlaban,

Hi, any chance you upgraded your plotting in the future approach?

Appreciate if you can share. So far, no one here has picked up on your marvelous idea.

Great work, many thanks.

Cheers!

Visit my NexusFi Trade Journal Reply With Quote
The following user says Thank You to aligator for this post:
  #6 (permalink)
lOQl
United States
 
Posts: 8 since Aug 2010
Thanks Given: 5
Thanks Received: 8


aligator View Post
@ehlaban,

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.

My cursor shows the chart time in the future when I turn off the equidistant bar spacing.

Attached Thumbnails
Click image for larger version

Name:	Untitled.png
Views:	241
Size:	75.0 KB
ID:	105810  
Reply With Quote
The following user says Thank You to lOQl for this post:
  #7 (permalink)
 ehlaban 
Netherlands
 
Experience: Advanced
Platform: Ensign, Multicharts
Trading: SP500
Posts: 91 since Nov 2009
Thanks Given: 66
Thanks Received: 57

I'm afraid I haven't done any Ninja coding anymore. I hope
version 8 solves these kind of challenges as well.

Started this thread Reply With Quote
  #8 (permalink)
 
aligator's Avatar
 aligator 
Las Vegas, NV
Market Wizard
 
Experience: Advanced
Platform: Abacus, Slide Rule, HP-65
Trading: Futures, Stocks, Options
Posts: 3,614 since Aug 2010
Thanks Given: 1,071
Thanks Received: 5,988


lOQl View Post
My cursor shows the chart time in the future when I turn off the equidistant bar spacing.

@lOQl,

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.

Visit my NexusFi Trade Journal Reply With Quote
The following user says Thank You to aligator for this post:
  #9 (permalink)
 Suraj 
Boston, MA/USA
 
Experience: Intermediate
Platform: Ninja Trader
Trading: ES, MES
Posts: 16 since Aug 2012
Thanks Given: 60
Thanks Received: 3


ehlaban View Post


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.
...................
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.


Hi ehlaban,

Can you tell us what you use to get planetary data and how you link to it - also if you are doing calculations in Ninja trader itself? Can you give us as an example how you gather the mercury declination data?

Thanks very much

Reply With Quote





Last Updated on March 25, 2017


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts