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 > NinjaScript Development Support > Strategy Development

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

Reply
 
Thread Tools Display Modes
Old 07-20-2009, 01:27 PM   #1
TAJTrades
Senior Member
 
Join Date: Dec 2007
Location: Atlanta
Posts: 281
Thanks: 0
Thanked 4 times in 3 posts
Default Min. bars required for Strategy

What is the code sequence to control the "Min. bars required" for a strategy?
Attached Images
File Type: png NT Forum 001.png (33.3 KB, 6 views)
TAJTrades is offline  
Reply With Quote
Old 07-20-2009, 01:31 PM   #2
NinjaTrader_Austin
NinjaTrader Customer Service
 
NinjaTrader_Austin's Avatar
 
Join Date: Jun 2009
Location: Denver, CO
Posts: 3,149
Thanks: 10
Thanked 89 times in 81 posts
Default

TAJ the reference is simply BarsRequired:
Code:
protected override void Initialize() 
{ 
    BarsRequired = 10; // Do not plot until the 11th bar on the chart 
}
NinjaTrader_Austin 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
Min. bars required SystemTrading Strategy Development 5 06-11-2009 10:37 AM
min Bar required gg80108 General Programming 1 04-28-2009 12:08 PM
Min. Bars Required Question... BigDog008 Automated Trading 3 12-26-2008 11:57 PM
Min bars required in a live strategy bluelou Strategy Development 5 08-25-2008 12:04 PM
Min Bars required under strategy backtesting Sidhartha Strategy Development 4 04-08-2008 07:17 AM


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