NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > NinjaScript Development Support > Strategy Development

Strategy Development Support for the development of custom automated trading strategies using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 01-11-2012, 01:48 PM   #1
BankRobber
Member
 
Join Date: Aug 2011
Location: New York
Posts: 35
Thanks: 6
Thanked 2 times in 2 posts
Default How to get Prior day open close high low from the broker

My broker is IB, and I'd like to know is there any way to get prior day open, close, high, low, and daily candle straight from the broker.
I ask this because, sometimes I'm missing some recorded data, so Pivot calculations inside the strategy won't be accurate.
Last edited by BankRobber; 01-11-2012 at 01:52 PM.
BankRobber is offline  
Reply With Quote
Old 01-11-2012, 01:56 PM   #2
NinjaTrader_RyanM
NinjaTrader Customer Service
 
NinjaTrader_RyanM's Avatar
 
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
Default

Hi BankRobber,

Yes, you can get some of these values directly from the data provider. See OnMarketData here:
http://www.ninjatrader.com/support/h...aeventargs.htm

Most of these values are for the current day. Best may be to add a daily interval to multiseries NinjaScript, and you can access from the provider that way.
NinjaTrader_RyanM is offline  
Reply With Quote
Old 01-11-2012, 02:28 PM   #3
BankRobber
Member
 
Join Date: Aug 2011
Location: New York
Posts: 35
Thanks: 6
Thanked 2 times in 2 posts
Default

Quote:
Originally Posted by NinjaTrader_RyanM View Post
Hi BankRobber,

Yes, you can get some of these values directly from the data provider. See OnMarketData here:
http://www.ninjatrader.com/support/h...aeventargs.htm

Most of these values are for the current day. Best may be to add a daily interval to multiseries NinjaScript, and you can access from the provider that way.
What if i have multiple instruments in my strategy, can i get MarketDataEventArgs for every instrument?
BankRobber is offline  
Reply With Quote
Old 01-11-2012, 02:38 PM   #4
NinjaTrader_RyanM
NinjaTrader Customer Service
 
NinjaTrader_RyanM's Avatar
 
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
Default

Yes, you can filter events within a specific BarsInProgress.

Here is the page to OnMarketData() event.
http://www.ninjatrader.com/support/h...marketdata.htm
Last edited by NinjaTrader_RyanM; 01-11-2012 at 02:49 PM.
NinjaTrader_RyanM is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I get the High, Low, Open, Close from BarsArray? atrader General Programming 2 04-24-2009 08:47 AM
Charting Highest High And Lowest Low Of Prior Day pedroprada@bellsouth.net Charting 3 12-29-2008 10:17 AM
Charting high/low/close and open/close widths gluebunny Charting 11 09-29-2008 10:47 AM
Plotting Open, High, Low, and Close. strategy1 General Programming 1 07-22-2008 03:20 PM
Trouble with Open, High, Low, Close SuzyG Indicator Development 4 03-05-2007 04:03 AM


All times are GMT -6. The time now is 06:33 AM.