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 > Miscellaneous Support

Miscellaneous Support Miscellaneous support issues.

Reply
 
Thread Tools Display Modes
Old 11-14-2011, 05:30 PM   #1
Shawn
Member
 
Join Date: Nov 2008
Posts: 31
Thanks: 0
Thanked 0 times in 0 posts
Default Convert LookBack # of bars back to a fixed Date

Hi,

How could I easily convert a LookBack (number of bars back ) to a fixed date. I'm using daily charts... I want to select a fixed date instead of bars back in the following code below. Thanks so much.

if (CurrentBar < LookBack)return;
double a = RSI (14, 3)[0];
double b = RSI (14, 3 )[LookBack];
Plot0.Set(a - b);
Shawn is offline  
Reply With Quote
Old 11-15-2011, 02:13 AM   #2
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,404
Thanks: 252
Thanked 973 times in 956 posts
Default

Shawn, you could work with GetBar() for this purpose -

http://www.ninjatrader.com/support/h...nt7/getbar.htm
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
Convert String to Date Time freeway Strategy Analyzer 9 10-29-2011 05:17 PM
How to keep End Date fixed nicbizz Charting 9 01-20-2011 09:15 AM
Comparing date of current bar to fixed date sgordet Strategy Development 1 12-28-2010 04:50 AM
# of bars to look back (Market analyzer) vs. Period vs. Maximum bars look back Arpad Version 7 Beta General Questions & Bug Reports 5 10-28-2010 01:45 PM
Maximum Bars Lookback zweistein Version 7 Beta General Questions & Bug Reports 9 12-15-2009 05:36 AM


All times are GMT -6. The time now is 12:55 PM.