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 02-13-2012, 07:39 AM   #1
"CJS"
Senior Member
 
Join Date: Jun 2010
Posts: 151
Thanks: 0
Thanked 0 times in 0 posts
Default Rare situation

For some reason a pending order one day is executed at the first 4Range bar on the next day. And it is close backwards in time!!.

I work with ExitOnClose=true;

I canīt find the solution.

In the traceorders log no execution at that time. All orders seems to be cancelled at the end of the session.

Any clue with happening this?

Thanks in advanced
"CJS" is offline  
Reply With Quote
Old 02-13-2012, 07:44 AM   #2
"CJS"
Senior Member
 
Join Date: Jun 2010
Posts: 151
Thanks: 0
Thanked 0 times in 0 posts
Default

I forgot to tell that the order is send from a secondary dataSeries.
DataSeries are overlapping.

Thanks
"CJS" is offline  
Reply With Quote
Old 02-13-2012, 08:16 AM   #3
NinjaTrader_Joydeep
NinjaTrader Customer Service
 
NinjaTrader_Joydeep's Avatar
 
Join Date: Dec 2011
Location: India
Posts: 3,286
Thanks: 580
Thanked 546 times in 541 posts
Default

Hello CJS,
Thanks for writing in and I am happy to assist you.

Are the orders being submitted in Historical bars or live bars?

I look forward to assist you further.
NinjaTrader_Joydeep is offline  
Reply With Quote
Old 02-13-2012, 08:30 AM   #4
"CJS"
Senior Member
 
Join Date: Jun 2010
Posts: 151
Thanks: 0
Thanked 0 times in 0 posts
Default

On Historical.

Is a back test.

Thanks
"CJS" is offline  
Reply With Quote
Old 02-13-2012, 09:19 AM   #5
NinjaTrader_Joydeep
NinjaTrader Customer Service
 
NinjaTrader_Joydeep's Avatar
 
Join Date: Dec 2011
Location: India
Posts: 3,286
Thanks: 580
Thanked 546 times in 541 posts
Default

Hello CJS,
Thanks for the input.

Please make sure you are not submitting any entry orders on the last bar of the session since historical bars are calculated at the end of the bar. This is a limitation at this point of time.

To rectify the issue, add an additional layer of filter in your code (like a time filter http://ninjatrader.com/support/forum...ead.php?t=3226 etc) to avoid entering a new position at the last bar.

Please let me know if I can assist you any further.
NinjaTrader_Joydeep 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
strange situation with strategy names daglas Strategy Development 3 10-03-2011 10:37 AM
Rare Different Simple Moving Average Indicator?!?!? olingerc Indicator Development 15 01-16-2011 07:35 PM
Reproducible but admittedly rare bug saltminer Strategy Development 3 05-04-2009 07:07 AM
A rare problem with a specific order. MGDavid Automated Trading 5 06-05-2007 11:47 AM


All times are GMT -6. The time now is 02:59 AM.