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 > General Programming

General Programming General NinjaScript programming questions.

Reply
 
Thread Tools Display Modes
Old 07-23-2012, 05:08 PM   #1
Downhillryder
Junior Member
 
Join Date: Feb 2012
Posts: 17
Thanks: 1
Thanked 0 times in 0 posts
Default DownHillRyder

Hi

Can you tell me if FirstTickOfBar is valid only for the primary bars object or is it valid for other BarArray ? i.e

protectedoverridevoid Initialize()
{
Add(Instrument.FullName ........); // Instrument 1
Add(Instrument.FullName ........); // Instrument 2

.....

protectedoverridevoid OnBarUpdate()
{
if (FirstTickOfBar == true) // Valid for base instrument

if(BarsInProgress !=0)
{
if (BarsInProgress ==1)
{
If (FirstTickOfBar == true) // Is this valid for Instrument 1
{


if (BarsInProgress ==2)
{
If (FirstTickOfBar == true) // Is this valid for Instrument 2
{


Thanks for any help

Downhillryder is offline  
Reply With Quote
Old 07-24-2012, 02:00 AM   #2
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
Default

Downhillryder, welcome to our forums here - FirstTickOfBar would work in any bars series context.
NinjaTrader_Bertrand is offline  
Reply With Quote
Reply

Tags
firsttickofbar

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


All times are GMT -6. The time now is 01:25 AM.