PDA

View Full Version : Exit trades before News


daxtrading
10-09-2010, 04:11 AM
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?

NinjaTrader_Bertrand
10-09-2010, 11:53 AM
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/forum/showthread.php?t=3226

daxtrading
10-09-2010, 12:32 PM
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/forum/showthread.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?

NinjaTrader_Bertrand
10-10-2010, 02:00 AM
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/HelpGuideV6/Time.html