![]() |
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
|
|||||||
| General Programming General NinjaScript programming questions. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Dec 2007
Posts: 115
Thanks: 2
Thanked 0 times in 0 posts
|
Hi,
Code following " if (Historical) " is executed on the first tick of the first bar of the current live session. Is there a way to prevent this? Thanks |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
To clarify.
if (Historical) Print("Something"); You are saying that on the 1st tick of real-time bar, this code executes? If yes, how do you know that it is real-time?
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Dec 2007
Posts: 115
Thanks: 2
Thanked 0 times in 0 posts
|
Yes. I open the chart before the session starts. The code is executed on the historical bars (which is what I want and would expect).
Then when the session starts, the code executes on the first tick of the new bar. I print out the time, price, volume, etc., so I know it's the first bar of today's session. |
|
|
|
|
|
#4 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
Thanks again. This is confirmed and we will resolve this for NT7 at this time.
Ray
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Fill to Current Bar | argito | Strategy Analyzer | 3 | 05-26-2008 07:51 AM |
| Current Bid >= Last Fill + (0.5 x ATR) | davidfw1866 | Strategy Development | 4 | 11-28-2007 07:45 AM |
| Session Begins -- Session Ends | bmaltz | Charting | 6 | 11-11-2007 11:45 PM |
| Changing Session Begins and Session Ends time | forexample | Charting | 1 | 10-21-2007 01:16 AM |
| How to plot an indicator only on the current session | max1ci6 | Indicator Development | 2 | 04-24-2007 07:50 PM |