NinjaTrader Support Forum  
X

Attention!

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


Go Back   NinjaTrader Support Forum > Application Technical Support > Automated Trading

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.

Reply
 
Thread Tools Display Modes
Old 10-09-2010, 04:11 AM   #1
daxtrading
Member
 
Join Date: Jan 2009
Posts: 49
Thanks: 0
Thanked 0 times in 0 posts
Default Exit trades before News

Hello,

I have several strategies and using a NewsManager to block trades during news.

This week I had an overfill because of exit on news and stoploss being triggered at the same time.

Is there a code to exit a no. of minutes before the news?
daxtrading is offline  
Reply With Quote
Old 10-09-2010, 11:53 AM   #2
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,414
Thanks: 252
Thanked 978 times in 961 posts
Default

daxtrading, this would be possible if you could access the news indicator to check for pending news...or you simply set up time inputs for the strategy and then designate a window of 3 mins before / after to no take any trades and exit any ones being held -

http://www.ninjatrader.com/support/f...ead.php?t=3226
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 10-09-2010, 12:32 PM   #3
daxtrading
Member
 
Join Date: Jan 2009
Posts: 49
Thanks: 0
Thanked 0 times in 0 posts
Default

Quote:
Originally Posted by NinjaTrader_Bertrand View Post
daxtrading, this would be possible if you could access the news indicator to check for pending news...or you simply set up time inputs for the strategy and then designate a window of 3 mins before / after to no take any trades and exit any ones being held -

http://www.ninjatrader.com/support/f...ead.php?t=3226
I can access the newsindicator and it is checking for pending news.
My strategy is not trading x minutes before and x minutes after news.
I am not a programmer and my strategy is now exiting a trade when the news is released and that is giving me bad fills.

I am not a programmer but understand my strategies/code.

Any example to add code that say's exit x minutes before news?
daxtrading is offline  
Reply With Quote
Old 10-10-2010, 02:00 AM   #4
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,414
Thanks: 252
Thanked 978 times in 961 posts
Default

I would unfortunately not be familiar with your custom code checking for news, but if it gives you a news time you can easily create such an exit...you would check for the time being equal to the news time - an offset (for example 2 mins) and then call ExitLong / ExitShort to get flat (ignored when position does not exist) - http://www.ninjatrader-support.com/H...deV6/Time.html
NinjaTrader_Bertrand 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
Exit on Close == No more trades cgeorgan Version 7 Beta General Questions & Bug Reports 2 06-30-2010 01:26 PM
Behavior Confirmation - Unique Trades + Exit Orders cgeorgan Automated Trading 5 06-21-2010 02:09 PM
News kenomalley Version 7 Beta General Questions & Bug Reports 2 06-10-2010 03:10 PM
Best way to exit a trades that have ATM and Stop? higler SuperDOM and other Order Entry Windows 1 05-13-2007 12:38 PM
Multiple Simultaneous Trades at "Exit on Close" With Setting "1 Entry Per Direction&q KBJ Strategy Analyzer 1 04-27-2007 05:34 AM


All times are GMT -6. The time now is 11:30 PM.