![]() |
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
|
|||||||
| Automated Trading Support for automated trading systems using NinjaScript. Support for our ATI (Automated Trading Interface) used to link an external application such as TradeStation and eSignal to NinjaTrader. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: May 2009
Posts: 28
Thanks: 2
Thanked 0 times in 0 posts
|
Hi
I need to automate an order entry at the close of the session, which ideally would be right the opposite of the "ExitOnClose" instruction. I am not finding a solution that effectively triggers the order everyday at the (close - n) seconds. I am wondering if you can shed some light on what is the best approach to handle this? The code runs in 10 minute bar aggregation and I want the order to be sent in the last few seconds of the session end, exactly in the same way the "ExitOnClose" instruction handles it. Thanks |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
|
Hi zerosum666,
Unfortunately there is nothing built in to monitor for end of session. It must all be custom coded. You could work with time. If you are working historically, you can refer to bar's time stamp with Time[0]. For real time, the C# property DateTime.Now gets the time for your PC clock. Either of these can be checked for an entry condition. http://www.ninjatrader.com/support/f...ad.php?t=19292
Ryan M
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Enter at Session Open | upshon | Strategy Development | 1 | 01-03-2011 04:00 AM |
| Enter on Close | gogetit | Strategy Development | 1 | 10-28-2010 03:00 AM |
| How can I enter at close of bar one and exit at close of session? | stevep3 | Strategy Analyzer | 5 | 10-15-2010 04:49 AM |
| Enter at Close, Exit next day Close | tjendra | Strategy Development | 3 | 04-08-2009 11:33 AM |
| How to enter market on close order? | cunparis | Strategy Development | 1 | 10-06-2008 08:17 AM |