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.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 07-25-2010, 05:32 PM   #1
tradetree
Senior Member
 
Join Date: Dec 2009
Location: New England
Posts: 320
Thanks: 3
Thanked 2 times in 2 posts
Default Last bar in chart

Is there a call-back method for when you are on the last bar of a chart. This is important for back-testing, so that you can calculate results at the end of a series of bars. I could do this on my own using OnBarUpdate and waiting for x number of bars to pass, but that would require my keeping track manually as I change the "end date" of the chart. Or is there a way to access what is the last date of a chart from within the strategy? This is for the same reason, so I could test Time[0] is equal to the last date. The last bar count would also do it.
tradetree is offline  
Reply With Quote
 

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
My bar chart saeed Charting 1 05-31-2010 04:48 AM
Change chart panel back color and bar color for a previous bar. ackchan General Programming 5 03-09-2010 08:44 AM
Backtest vs real-time Chart orders placed at Open of next bar vs Close of curr bar? tomace Strategy Analyzer 3 03-18-2009 07:06 AM
first bar of the chart tradereight Strategy Development 5 01-13-2009 09:39 AM
Bar index from the session or plot bar number on an intraday chart eneratom General Programming 1 02-27-2008 06:48 AM


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