![]() |
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
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Apr 2008
Posts: 164
Thanks: 2
Thanked 3 times in 3 posts
|
Hi guys,
I've just noticed that Closes[1][-1] works just fine in Historical, returning the true closing price for a barsarray that has not yet experienced its OnBarUpdate(). For example, in BarsInProgress==0, Closes[1][0] actually returns the value of the bar before the current one in BarsInProgress==0. This is documented and expected. Yet Closes[1][-1] works just great! Yahoo! I wish I had known that several thousand lines of code ago. My question is - is it safe to use? Thanks, saltminer |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
>> My question is - is it safe to use?
No it's not. It's definitely outside the specifications and thus may or may not work.
Dierk
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Order exiting at market after bar closes | rscowboy1 | Strategy Development | 2 | 05-13-2009 01:33 PM |
| IB Auto closes at Night | market_student | Connecting | 3 | 03-25-2009 02:43 PM |
| ATM strategies execute after market closes?? | bridenour | ATM Strategies (Discretionary Trading) | 4 | 01-21-2009 04:56 PM |
| No money going in Realized P&L when trade closes | jlm0@infionline.net | Historical NinjaTrader 6.5 Beta Threads | 12 | 11-12-2007 07:01 AM |
| Strategies stop after position closes | ashish | Automated Trading | 3 | 11-04-2007 01:24 AM |