NinjaTrader Support Forum  
X

Attention!

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


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-24-2012, 12:45 PM   #1
nanook77
Member
 
Join Date: Jan 2010
Location: oklahoma
Posts: 41
Thanks: 20
Thanked 0 times in 0 posts
Send a message via Skype™ to nanook77
Default Strategy recalculation on subsequent bars

I need some help please, and thanks in advance.

Problem: My auto trading strategy needs to recalculate the value of Bar [0] based on information from the next five (5) bars Bar [-5] as each bar closes.

The code from my indicator is as follows:

(MAX(CCI(28), 7)[0-LowestBar(CCI(14), 5) ]

Is there any feasible to make this happen in NT7?

Again - thanks in advance for any insight.

d
nanook77 is offline  
Reply With Quote
Old 01-24-2012, 01:05 PM   #2
NinjaTrader_Joydeep
NinjaTrader Customer Service
 
NinjaTrader_Joydeep's Avatar
 
Join Date: Dec 2011
Location: India
Posts: 3,286
Thanks: 580
Thanked 546 times in 541 posts
Default

Hello nanook77,
Thanks for your post and I am happy to assist you.

Could specify what exactly you are trying to do, so that I can point to the right direction.

I look forward assisting you.
NinjaTrader_Joydeep is offline  
Reply With Quote
Old 01-24-2012, 01:08 PM   #3
koganam
Senior Member
 
Join Date: Feb 2008
Location: Durham, North Carolina, USA
Posts: 3,220
Thanks: 24
Thanked 1,232 times in 1,003 posts
Send a message via Skype™ to koganam
Default

Quote:
Originally Posted by nanook77 View Post
I need some help please, and thanks in advance.

Problem: My auto trading strategy needs to recalculate the value of Bar [0] based on information from the next five (5) bars Bar [-5] as each bar closes.

The code from my indicator is as follows:

(MAX(CCI(28), 7)[0-LowestBar(CCI(14), 5) ]

Is there any feasible to make this happen in NT7?

Again - thanks in advance for any insight.

d
You cannot calculate the CurrentBar, bar[0], based on a future that has not yet happened. Is your real meaning that you want to recalculate the value for 5 bars ago, based on the bars that have happened since then until the CurrentBar?
koganam is offline  
Reply With Quote
Reply

Tags
programming, recalculate, refresh, strategy

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
More than 100 subsequent user events cls71 Version 7 Beta General Questions & Bug Reports 3 04-26-2010 11:18 AM
Chart recalculation? eDanny Suggestions And Feedback 2 08-28-2009 10:31 AM
More than 100 subsequent events? heech General Programming 7 04-22-2009 12:52 PM
Internet dropouts prevent subsequent orders saltminer Strategy Development 27 02-11-2009 10:32 AM
Subsequent User Events Error SystemTrading Strategy Development 14 09-03-2008 09:00 AM


All times are GMT -6. The time now is 08:06 PM.