NexusFi: Find Your Edge


Home Menu

 





Federal Reserve Announcements: Trading Around and Thru


Discussion in NinjaTrader

Updated
    1. trending_up 1,207 views
    2. thumb_up 1 thanks given
    3. group 2 followers
    1. forum 1 posts
    2. attach_file 0 attachments




 
Search this Thread

Federal Reserve Announcements: Trading Around and Thru

  #1 (permalink)
VenturaBob
Los Angeles, CA
 
Posts: 2 since Feb 2015
Thanks Given: 0
Thanks Received: 5

The market goes crazy immediately after each Federal Reserve announcement. I do a lot of backtesting and would like for my strategies not to trade for the 15’ around these anncments.
My current way of dealing with this is to simply have my script not trade between 11:00 and 11:15. However, I have that for every trading day, not just the Fed anncmnt days.
The better way to do this is to have my script not trade during that time only on those days. So, I’d like to put those dates into my script. Yes, I could go to the Fed’s webpage and get those dates. But, before I do that, I’m wondering if you have any comments about this, and how I might do this easiest.

Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
REcommedations for programming help
Sierra Chart
ZombieSqueeze
Platforms and Indicators
Quant vue
Trading Reviews and Vendors
Better Renko Gaps
The Elite Circle
How to apply profiles
Traders Hideout
 
  #2 (permalink)
 iantg 
charlotte nc
 
Experience: Advanced
Platform: My Own System
Broker: Optimus
Trading: Emini (ES, YM, NQ, ect.)
Posts: 408 since Jan 2015
Thanks Given: 90
Thanks Received: 1,148

This can be achieved by just creating a date time variable for each key event that you want to monitor then comparing the current day/ hour/ minute/ to the time signature of the event in your variable. For example:

if((ToTime(Time[0]) + ToTime(0,15,0) == VariableEvent)
{
// This is 15 minutes prior to the announcement time. Don't trade
}

if((ToTime(Time[0]) > VariableEvent +ToTime(0,15,0) )
{
// This is 15 after the announcement. Trade Again.
}

To get exact times to match, you just do something like: If Current Time + 15 minutes = VariableEvent then don't trade and then following announcements: If Current Time > 15 minutes + VariableEvent then trade again.

There are a number of date classes in C# you can use, but here is a simple way to implement this.


In your declarations sections add using System.Globalization;
Then create a short simple custom class with your variables like this:

class datetime
{
DateTime FedAnnouncment1 = new DateTime(2017,08,19,20,08,30);
DateTime FedAnnouncment2 = new DateTime(2018,04,15,15,03,43);
//etc.
}


Then you can call the FedAnnouncment variables from your code in any event handler you like and compare it to the current time (Like in the example above), check to see if you are within a 10-15 minutes window either before or after and simply just sit these windows out.

It's fairly easy to do.

Happy coding!

Ian

Visit my NexusFi Trade Journal Reply With Quote




Last Updated on January 10, 2018


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts