NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > NinjaScript Development Support > General Programming

General Programming General NinjaScript programming questions.

Reply
 
Thread Tools Display Modes
Old 11-19-2007, 02:05 AM   #1
ashish
Member
 
Join Date: Oct 2007
Location: israel
Posts: 63
Thanks: 0
Thanked 0 times in 0 posts
Default Time series question

Am I making a mistake here? Why are there trades after 11pm?

Ashish
Attached Images
File Type: jpg Time.JPG (55.8 KB, 19 views)
Last edited by ashish; 11-19-2007 at 02:27 AM.
ashish is offline  
Reply With Quote
Old 11-19-2007, 02:08 AM   #2
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Default

Sorry, I don't follow.
NinjaTrader_Dierk is offline  
Reply With Quote
Old 11-19-2007, 02:28 AM   #3
ashish
Member
 
Join Date: Oct 2007
Location: israel
Posts: 63
Thanks: 0
Thanked 0 times in 0 posts
Default

Sorry pls see thumbnail
ashish is offline  
Reply With Quote
Old 11-19-2007, 07:38 AM   #4
ashish
Member
 
Join Date: Oct 2007
Location: israel
Posts: 63
Thanks: 0
Thanked 0 times in 0 posts
Default

Hello,
Would someone please respond to this post?
ashish is offline  
Reply With Quote
Old 11-19-2007, 07:40 AM   #5
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Default

A support rep will contact you shortly.
NinjaTrader_Dierk is offline  
Reply With Quote
Old 11-19-2007, 09:37 PM   #6
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
Default

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.
NinjaTrader_Josh is offline  
Reply With Quote
Old 11-20-2007, 06:16 AM   #7
ashish
Member
 
Join Date: Oct 2007
Location: israel
Posts: 63
Thanks: 0
Thanked 0 times in 0 posts
Default

You ae the man Josh! Thank you
Ashish
ashish is offline  
Reply With Quote
Reply

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


All times are GMT -6. The time now is 08:41 PM.