![]() |
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
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Dec 2008
Location: Castle Pines, Co
Posts: 621
Thanks: 1
Thanked 2 times in 2 posts
|
I have open orders at the end of the session. Inclosed are some picture of the chart setting, and the order entry strategy. Whats the trick to making this work?
|
|
|
|
|
|
#2 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
Please track your orders with TraceOrders = true and see if it encountered problems submitting the order. http://www.ninjatrader-support2.com/...ead.php?t=3627
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#3 | |
|
Senior Member
Join Date: Dec 2008
Location: Castle Pines, Co
Posts: 621
Thanks: 1
Thanked 2 times in 2 posts
|
Quote:
|
|
|
|
|
|
|
#4 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
As evidenced by your logs no Exit on Close order was placed. Please try with the SampleMACrossOver strategy to see if you can get Exit on Close to place.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Dec 2008
Location: Castle Pines, Co
Posts: 621
Thanks: 1
Thanked 2 times in 2 posts
|
The SampleMACrossover, did not close orders at end of session.. Ran it on two different PCs and did not close orders.
The SampleMACrossover would not let me add the TraceOrders = true,, saying something about thats its a system strategy. |
|
|
|
|
|
#6 |
|
NinjaTrader Customer Service
Join Date: May 2008
Location: Denver, CO
Posts: 3,157
Thanks: 0
Thanked 3 times in 3 posts
|
Hello,
Can you post your log and trace files after running the sample strategy so we can verify? Try right clicking the code>Save as... and change the name. Then add TraceOrders = true.
Ben
NinjaTrader Customer Service |
|
|
|
|
|
#7 |
|
Senior Member
Join Date: Dec 2008
Location: Castle Pines, Co
Posts: 621
Thanks: 1
Thanked 2 times in 2 posts
|
trace and log
|
|
|
|
|
|
#8 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
Please post complete trace and logs along with timestamps of your latest version. Also, to please be using SampleMACrossOver and try on different instruments. Thank you.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#9 |
|
Senior Member
Join Date: Dec 2008
Location: Castle Pines, Co
Posts: 621
Thanks: 1
Thanked 2 times in 2 posts
|
the current logs are two posts down
|
|
|
|
|
|
#10 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
gg80108,
It looks like you are backtesting. I am assuming you are doing it on the Strategy Analyzer. Please ensure you actually defined out the 9:30-4pm time frame in the strategy selection dialogue. Please then try increasing the seconds till exit significantly. We are just trying to get a base case that works so we have somewhere to start.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#11 | |
|
Senior Member
Join Date: Dec 2008
Location: Castle Pines, Co
Posts: 621
Thanks: 1
Thanked 2 times in 2 posts
|
Quote:
Strategy Analyzer seems only to contain "Exit on close" but does not have the "Exit on close seconds" to change, in order handling.. I did move the session time back in Strategy Analyzer to create an open order at end of session and open orders were closed everytime, but I also set "Exit on close" to false and it still generated the "Exit on close" order. Strategy Analyzer just doesn't seem to be useful in this test. |
|
|
|
|
|
|
#12 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
Not sure I follow. If you want Exit on Close you need to set it to true. At the very end of the backtest you will always get an Exit on Close order regardless of the setting too.
If you are running on replay please don't run it at 500x. Please slow it down or just set session times that will trigger an exit a few minutes into the replay and let it go at 1x.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#13 | |
|
Senior Member
Join Date: Dec 2008
Location: Castle Pines, Co
Posts: 621
Thanks: 1
Thanked 2 times in 2 posts
|
Quote:
|
|
|
|
|
|
|
#14 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
Backtesting would not have this since there is no "intrabar" handling.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#15 |
|
Senior Member
Join Date: Dec 2008
Location: Castle Pines, Co
Posts: 621
Thanks: 1
Thanked 2 times in 2 posts
|
Seems like we are not communicating anymore.. How can we reset this and get back on the same page?
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Put Session Begin and Session End times in chart title | Jim W. | Suggestions And Feedback | 1 | 03-12-2009 03:32 AM |
| Using different timeframes AND session begin / end | Brian1 | Strategy Development | 4 | 03-06-2009 12:59 PM |
| Session start, Session end | TedLincoln | Charting | 4 | 02-25-2009 02:03 PM |
| Session begins and end in script. | Czarek | Strategy Development | 2 | 02-23-2009 07:40 AM |
| Orders auto closing at end of day | jyounk | Strategy Development | 3 | 08-01-2008 11:34 AM |