NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


Go Back   NinjaTrader Support Forum > Application Technical Support > Automated Trading

Automated Trading Support for automated trading systems using NinjaScript. Support for our ATI (Automated Trading Interface) used to link an external application such as TradeStation and eSignal to NinjaTrader.

Reply
 
Thread Tools Display Modes
Old 12-15-2010, 05:41 AM   #1
561timw
Member
 
Join Date: Dec 2008
Posts: 33
Thanks: 0
Thanked 0 times in 0 posts
Default Daily ATR for intra day strategy

Hi:

What is the easiest way to add a Daily ATR condition to an intraday strategy?
561timw is offline  
Reply With Quote
Old 12-15-2010, 06:05 AM   #2
NinjaTrader_Brett
NinjaTrader Customer Service
 
NinjaTrader_Brett's Avatar
 
Join Date: Dec 2009
Location: Denver, CO, USA
Posts: 6,498
Thanks: 109
Thanked 291 times in 280 posts
Default

Hello,

Thanks for your forum post.

Depends on a couple things as theres 2 ways to do this, what chart type will you be running this strategy on?

Also, what data feed provider are you connected too?

Have you done any Multi Time Frame Programming yet?

I look forward to assisting you further.
NinjaTrader_Brett is offline  
Reply With Quote
Old 12-16-2010, 04:33 PM   #3
561timw
Member
 
Join Date: Dec 2008
Posts: 33
Thanks: 0
Thanked 0 times in 0 posts
Default

1. I am using a 4 or 5 range chart
2. Interactive Broker
3. I messed around with the Multi Time Frame Programming but struggled.
561timw is offline  
Reply With Quote
Old 12-16-2010, 04:37 PM   #4
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
Default

561timw,

Instead of going off of multi-time frame strategies, you can try grabbing the daily information by using something like PriorDayOHLC(). Using that on each old date and then calculating the ATR off of the information you gather should allow you to bypass the multi-time frame approach.
NinjaTrader_Josh is offline  
Reply With Quote
Old 12-17-2010, 04:11 AM   #5
561timw
Member
 
Join Date: Dec 2008
Posts: 33
Thanks: 0
Thanked 0 times in 0 posts
Default

I have used PriorDayOHLC() before but I am not sure I know how to use it in the manner you suggest. How would I tie PriorDayOHLC() to a specific date like 2 days ago or 3 days ago when trading off a range chart?
561timw is offline  
Reply With Quote
Old 12-17-2010, 04:54 AM   #6
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,404
Thanks: 252
Thanked 974 times in 957 posts
Default

You would work with GetBar() to know how much bars to reference back to 'grab' the needed value from the previous days - http://www.ninjatrader.com/support/f...ad.php?t=19176
NinjaTrader_Bertrand 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
Intra-Day Short-Term Range sunny15 NinjaScript File Sharing Discussion 2 10-19-2010 03:50 PM
How to set a bar color intra-day Spartacus General Programming 5 02-17-2010 08:10 AM
New intra day highs & lows Eoghan O Sullivan Market Analyzer 2 02-16-2010 10:46 AM
Intra-day historical charting sources? Trader61 Charting 1 08-29-2009 05:58 PM
Use of daily indicators during intra-day svrz Indicator Development 14 02-15-2008 12:26 PM


All times are GMT -6. The time now is 10:47 PM.