![]() |
|
|||||||
| General Programming General NinjaScript programming questions. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Member
Join Date: Oct 2007
Location: israel
Posts: 63
Thanks: 0
Thanked 0 times in 0 posts
|
Am I making a mistake here? Why are there trades after 11pm?
Ashish
Last edited by ashish; 11-19-2007 at 02:27 AM.
|
|
|
|
|
|
#2 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
Sorry, I don't follow.
Dierk
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Member
Join Date: Oct 2007
Location: israel
Posts: 63
Thanks: 0
Thanked 0 times in 0 posts
|
Sorry pls see thumbnail
|
|
|
|
|
|
#4 |
|
Member
Join Date: Oct 2007
Location: israel
Posts: 63
Thanks: 0
Thanked 0 times in 0 posts
|
Hello,
Would someone please respond to this post? |
|
|
|
|
|
#5 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
A support rep will contact you shortly.
Dierk
NinjaTrader Customer Service |
|
|
|
|
|
#6 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
ashish,
I am assuming you are running on a 5minute chart. Is this correct? The reason you are getting trade after 11 is because your condition is set at Time[1] not Time[0]. When you set it at Time[1] the comparison you are doing is effectively saying "If the time of the previous bar is less than 11pm, enter long". When you are backtesting this is what is happening with that code. On the current bar (time 11pm) it looks at the time of the previous bar (10:55pm). That time is less than 11pm so it wants to enter a trade. It enters the trade at the open of the next bar (11:05pm) because the 11pm bar is already completely closed and the next point in time is the open of the 11:05 bar hence the 11:05 timestamp on your trade.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#7 |
|
Member
Join Date: Oct 2007
Location: israel
Posts: 63
Thanks: 0
Thanked 0 times in 0 posts
|
You ae the man Josh! Thank you
Ashish |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| multi time frame question | pdawg | Strategy Analyzer | 5 | 10-18-2007 02:23 PM |
| Weekend data not triggering on secondary time series | gert74 | Strategy Development | 12 | 08-28-2007 08:12 PM |
| Time Frame Question | bwarner | Automated Trading | 1 | 08-01-2007 11:20 PM |
| Question about ToTime(Time[0]) | mazachan | General Programming | 1 | 07-09-2007 09:08 AM |
| Data Series question | NinjaTrader_Josh | Indicator Development | 4 | 05-25-2007 12:43 AM |