AddDataSeries in Ninjatrader 8 - NinjaTrader | futures io social day trading
futures io futures trading


AddDataSeries in Ninjatrader 8
Updated: Views / Replies:470 / 8
Created: by iq200 Attachments:0

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

AddDataSeries in Ninjatrader 8

  #1 (permalink)
Elite Member
Surrey, UK
 
Futures Experience: Intermediate
Platform: Ninjatrader, Tradestation
Broker/Data: Kinetick, InteractiveBrokers
Favorite Futures: Equities, Futures
 
Posts: 135 since Jun 2010
Thanks: 69 given, 59 received

AddDataSeries in Ninjatrader 8

Hi All,
Lets say I am using the 1 minute time frame chart. I now create an indicator in which I want to load 5 years of daily data (I guess using AddDataSeries) to perform some calculations. I can see that there is an API function:

AddDataSeries(string instrumentName, BarsPeriod barsPeriod, int barsToLoad, string tradingHoursName, bool? isResetOnNewTradingDay)

Is this the correct function to use? What do I set barsPeriod to? Would it be the daily value in minutes i.e. 1440 (24X60 minutes)? Also what do the tradingHoursName and isResetOnNewTradingDay parameters get set to?

Thanks,
iq

Reply With Quote
 
  #2 (permalink)
Administrator: Retired Backtester
 Vendor: speedytradingservers.com 
Rennes France
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: IB/Kinetick
Favorite Futures: Futures
 
sam028's Avatar
 
Posts: 3,351 since Jun 2009
Thanks: 3,558 given, 3,967 received


iq200 View Post
Hi All,
Lets say I am using the 1 minute time frame chart. I now create an indicator in which I want to load 5 years of daily data (I guess using AddDataSeries) to perform some calculations. I can see that there is an API function:

AddDataSeries(string instrumentName, BarsPeriod barsPeriod, int barsToLoad, string tradingHoursName, bool? isResetOnNewTradingDay)

Is this the correct function to use? What do I set barsPeriod to? Would it be the daily value in minutes i.e. 1440 (24X60 minutes)? Also what do the tradingHoursName and isResetOnNewTradingDay parameters get set to?

Thanks,
iq

Try a simple:
AddDataSeries(Data.BarsPeriodType.Day, 1);

In your case you don't need one of the other AddDataSeries() methods as there are only required if you want to add another dataserie for another instrument.

Success requires no deodorant! (Sun Tzu)
Reply With Quote
 
  #3 (permalink)
Elite Member
Surrey, UK
 
Futures Experience: Intermediate
Platform: Ninjatrader, Tradestation
Broker/Data: Kinetick, InteractiveBrokers
Favorite Futures: Equities, Futures
 
Posts: 135 since Jun 2010
Thanks: 69 given, 59 received



sam028 View Post
Try a simple:
AddDataSeries(Data.BarsPeriodType.Day, 1);

In your case you don't need one of the other AddDataSeries() methods as there are only required if you want to add another dataserie for another instrument.

Thanks Sam. One question - how does Ninjatrader know how much data to load? If my primary intraday data series is set to 1 minute and 2 days of data, will Ninjatrader only try to load 2 days of daily data? How can I tell it to load say 5 years rather than 10 years ?

Reply With Quote
 
  #4 (permalink)
Administrator: Retired Backtester
 Vendor: speedytradingservers.com 
Rennes France
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: IB/Kinetick
Favorite Futures: Futures
 
sam028's Avatar
 
Posts: 3,351 since Jun 2009
Thanks: 3,558 given, 3,967 received


iq200 View Post
Thanks Sam. One question - how does Ninjatrader know how much data to load? If my primary intraday data series is set to 1 minute and 2 days of data, will Ninjatrader only try to load 2 days of daily data? How can I tell it to load say 5 years rather than 10 years ?

I assume it's loading the amount of data related to your primary dataserie.

Success requires no deodorant! (Sun Tzu)
Reply With Quote
 
  #5 (permalink)
Elite Member
Surrey, UK
 
Futures Experience: Intermediate
Platform: Ninjatrader, Tradestation
Broker/Data: Kinetick, InteractiveBrokers
Favorite Futures: Equities, Futures
 
Posts: 135 since Jun 2010
Thanks: 69 given, 59 received


sam028 View Post
I assume it's loading the amount of data related to your primary dataserie.

But this means that if I want to build support and resistance from 5 years of daily data I need to load 5 years of 1 minute data (primary data series). This is why I was asking my original question in my first post. The point was to be able to use 2-3 days of 1 minute data for the primary series and load more daily data for my indicator.

Reply With Quote
 
  #6 (permalink)
Administrator: Retired Backtester
 Vendor: speedytradingservers.com 
Rennes France
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: IB/Kinetick
Favorite Futures: Futures
 
sam028's Avatar
 
Posts: 3,351 since Jun 2009
Thanks: 3,558 given, 3,967 received


iq200 View Post
But this means that if I want to build support and resistance from 5 years of daily data I need to load 5 years of 1 minute data (primary data series). This is why I was asking my original question in my first post. The point was to be able to use 2-3 days of 1 minute data for the primary series and load more daily data for my indicator.

In this case you may use another technique, something like this (not tested):
 
Code
BarsPeriod bp = new BarsPeriod();
bp.BaseBarsPeriodType = BarsPeriodType.Day;
bp.BaseBarsPeriodValue = 1;		
AddDataSeries(Instrument.ToString(), bp, 5, "Default 24 x 5", false);

Success requires no deodorant! (Sun Tzu)
Reply With Quote
The following user says Thank You to sam028 for this post:
 
  #7 (permalink)
Elite Member
Surrey, UK
 
Futures Experience: Intermediate
Platform: Ninjatrader, Tradestation
Broker/Data: Kinetick, InteractiveBrokers
Favorite Futures: Equities, Futures
 
Posts: 135 since Jun 2010
Thanks: 69 given, 59 received


sam028 View Post
In this case you may use another technique, something like this (not tested):
 
Code
BarsPeriod bp = new BarsPeriod();
bp.BaseBarsPeriodType = BarsPeriodType.Day;
bp.BaseBarsPeriodValue = 1;		
AddDataSeries(Instrument.ToString(), bp, 5, "Default 24 x 5", false);

Thanks Sam.

Reply With Quote
 
  #8 (permalink)
Administrator: Retired Backtester
 Vendor: speedytradingservers.com 
Rennes France
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: IB/Kinetick
Favorite Futures: Futures
 
sam028's Avatar
 
Posts: 3,351 since Jun 2009
Thanks: 3,558 given, 3,967 received


iq200 View Post
Thanks Sam.

You can also check GetDayBar(), this might be a smarter solution.

Success requires no deodorant! (Sun Tzu)
Reply With Quote
 
  #9 (permalink)
Elite Member
Surrey, UK
 
Futures Experience: Intermediate
Platform: Ninjatrader, Tradestation
Broker/Data: Kinetick, InteractiveBrokers
Favorite Futures: Equities, Futures
 
Posts: 135 since Jun 2010
Thanks: 69 given, 59 received


sam028 View Post
You can also check GetDayBar(), this might be a smarter solution.

I've got the AddDataSeries working now. Thanks.

Reply With Quote

Reply



futures io > > > > AddDataSeries in Ninjatrader 8

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)
 

Opening Breakouts and Reversals w/Al Brooks

Elite only
 

Introducing daytradr by Jigsaw, new stand-alone platform

Oct 19
 

RandBots: AutoTrading Bots to diversify your trading

Oct 24
 

TopstepTrader: Profiting Without Risking Your Own Money

Oct 26

Building Open Source Indicators for NT8 w/Fat Tails @ Lizard Indicators

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
[NinjaTrader]    How to AddDataSeries for Unirenko Bars for NT 8 WoodyFox Platforms and Indicators 7 May 18th, 2017 04:31 AM
Webinar: Preparing for NinjaTrader 8 (NT8) with Raymond Deux, CEO of NinjaTrader Big Mike NinjaTrader 21 October 28th, 2016 07:11 PM
NinjaTrader Advisory #30 - ES/YM/NQ Roll Over Dates in NinjaTrader NinjaTrader NinjaTrader 4 September 12th, 2016 09:53 AM
Webinar: NinjaTrader Brokerage and NinjaTrader 8 (NT8) discussion Big Mike NinjaTrader 8 July 2nd, 2014 08:17 PM
Can NinjaTrader data be stored other than \My Documents\NinjaTrader 6.5 tc12357 NinjaTrader 4 December 15th, 2009 01:55 PM


All times are GMT -4. The time now is 09:33 AM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts
Page generated 2017-10-17 in 0.12 seconds with 19 queries on phoenix via your IP 54.156.67.122