Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Broker: Tradestation/Tradestation, NinjaTrader, FXCM and Tallinex
Trading: ES, CL, EUR/USD, TF
Posts: 173 since Aug 2009
Thanks Given: 105
Thanks Received: 61
Hello
I currently am trying to write a program to do the following:
On current Bar (using Daily time frame) of the ES, find out which contract is the current contract and then which contract is the next contract.
So, if the last bar is Friday Feb 03 2012, then it would be
Then the next thing I want to do is figure out that the next contract is June
So, I have like 55 or so ES contracts from 1997 and wanted to figure this out. So, for each bar, it would have to check first which contract is being traded, which is the next contract, and then take the different of the current bar close of each contract, and if the currentContract > nextContract, show that as a bullish sign on the chart.
Also, I went through all 55 or so contracts the other day, and made an excel spread sheet according to contract rollover, and manually put in the Start Date, End Date, Contract Name
So, I have all of that start and stop data. Now I just need to know how to use this in Ninja Trader.
Also, I want to have this be an indicator in the bottom panel and therefore do not care if it is ES, or DJIA, or SPX, or GOOG in the upper panel as it does not depend on the upper panel data
I dont know how hard this would be.
I know that in C# (ASP.Net in this case), you can use something like this:
Also, that leads to the title of this post: I dont see the DateTime class in NinjaTrader.
I thought NinjaTrader included all of the entire .Net Libraries Framework. Maybe I am confused, but if I dont see that DateTime class in Ninja
and it is in Visual Studio 2012, how do I get it into NinjaTrader, so I can develop with it?
thanks
Spencer
Can you help answer these questions from other members on NexusFi?
Broker: Tradestation/Tradestation, NinjaTrader, FXCM and Tallinex
Trading: ES, CL, EUR/USD, TF
Posts: 173 since Aug 2009
Thanks Given: 105
Thanks Received: 61
HI Sam
thanks. I got confused because when I just typed DateTime in NinjaTrader, no intelisense popped up.
However, when I do it in visual studio, it pops up.
So, I am used to Java more than C# and how it works with libraries. Java is very portable and I always have to add the library to eclipse, then just import com.etc.......
In .Net, everything is already in the GAC so does that mean everything accessible by Visual Studio is also accessible by NinjaTrader by default-----no need to install additional .dll's, just word it correctly
Visual Studio:
DateTime start = Convert.ToDateTime("10 May 2010");
Ninja Trader:
System.DateTime start = Convert.ToDateTime("10 May 2010");
Does this sound right since both say using System; in the top?