NexusFi: Find Your Edge


Home Menu

 





News Reminder Indicator


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one sam028 with 8 posts (2 thanks)
    2. looks_two jonesr9 with 7 posts (1 thanks)
    3. looks_3 cunparis with 4 posts (2 thanks)
    4. looks_4 wuolong with 2 posts (0 thanks)
    1. trending_up 13,402 views
    2. thumb_up 5 thanks given
    3. group 9 followers
    1. forum 27 posts
    2. attach_file 8 attachments




 
Search this Thread

News Reminder Indicator

  #21 (permalink)
 jonesr9 
FL
 
Experience: Intermediate
Platform: NinjaTrader
Trading: ES, 6E, CL
Posts: 71 since Jul 2009
Thanks Given: 159
Thanks Received: 34


sam028 View Post
Is someone here know why this works:
 
Code
                            
Stream strm Client.OpenRead("http://www.dailyfx.com/calendar/Dailyfx_Global_Economic_Calendar.csv?currentWeek=/events-calendar/2009/0913/&direction=none&collector=allInFolderDateDesc&view=week&timezone=GMT&currencyFilter=|&importanceFilter=Medium|Low|"); 

and this not:
 
Code
                            
string url_news="http://www.dailyfx.com/calendar/Dailyfx_Global_Economic_Calendar.csv?currentWeek=/events-calendar/2009/0913/&direction=none&collector=allInFolderDateDesc&view=week&timezone=GMT&currencyFilter=|&importanceFilter=Low|";
Stream strm Client.OpenRead(url_news); 
???

The only thing I can think of is that when specifying a path within a STRING variable you need to double up on the forward slash marks similiar to the backward slash marks.

Example: c:\\temp\\temp.txt <- this works in STRING variables

Try this:

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
OrderFlow-Based Support/Resistance Levels
Emini and Emicro Index
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
What broker to use for trading palladium futures
Commodities
Quantum physics & Trading dynamics
The Elite Circle
Trade idea based off three indicators.
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
24 thanks
ApexTraderFunding.com experience and review
13 thanks
Trading with Intuition
12 thanks
GFIs1 1 DAX trade per day journal
9 thanks
EG Indicators
8 thanks
  #22 (permalink)
 
sam028's Avatar
 sam028 
Site Moderator
 
Posts: 3,765 since Jun 2009
Thanks Given: 3,825
Thanks Received: 4,629

Thx guys, but it's finally working, don't ask me why...
 
Code
                            
            string year_news="2009";
            
string month_news="09";
            
string day_news="13";
            
string filter_news="Medium|Low|"//No Medium/Low importance news
            
string url_news="http://www.dailyfx.com/calendar/Dailyfx_Global_Economic_Calendar.csv?";
            
url_news=String.Concat(url_news,"currentWeek=/events-calendar/");
            
url_news=String.Concat(url_news,year_news,"/",month_news,day_news,"/");
            
url_news=String.Concat(url_news,"&direction=none&collector=allInFolderDateDesc&view=week&timezone=GMT&currencyFilter=|&importanceFilter=",filter_news);

            
Stream strm Client.OpenRead(url_news);
            
StreamReader sr = new StreamReader(strm); 

Follow me on Twitter Reply With Quote
  #23 (permalink)
 
sam028's Avatar
 sam028 
Site Moderator
 
Posts: 3,765 since Jun 2009
Thanks Given: 3,825
Thanks Received: 4,629


Here is a pre-Alpha version, not finished at all, but I think it's a good start, the logic is already there, I just need to add some parameters for sound, plot arrows instead of a line, for customizable reg exp, etc, etc.
This indicator gets the news from Forex News | Forex Trading News | Currency Trading News, parse them, then print a line X minutes before the news.
In the code, I only take High importance news, and for USD currency (see regex).

It seems to work fine on my minutes charts, but as I wrote, it's not a production release.

Attached Thumbnails
Click image for larger version

Name:	newsAlert.JPG
Views:	325
Size:	54.8 KB
ID:	2371  
Attached Files
Elite Membership required to download: NewsAlert.cs
Follow me on Twitter Reply With Quote
Thanked by:
  #24 (permalink)
 jonesr9 
FL
 
Experience: Intermediate
Platform: NinjaTrader
Trading: ES, 6E, CL
Posts: 71 since Jul 2009
Thanks Given: 159
Thanks Received: 34

Nice job Sam.

Reply With Quote
  #25 (permalink)
 
cunparis's Avatar
 cunparis 
Paris, France
 
Experience: Advanced
Platform: Market Delta & Ninjatrader
Trading: ES
Posts: 2,565 since Jun 2009
Thanks Given: 1,162
Thanks Received: 2,094


sam028 View Post
Here is a pre-Alpha version, not finished at all, but I think it's a good start, the logic is already there, I just need to add some parameters for sound, plot arrows instead of a line, for customizable reg exp, etc, etc.
This indicator gets the news from Forex News | Forex Trading News | Currency Trading News, parse them, then print a line X minutes before the news.
In the code, I only take High importance news, and for USD currency (see regex).

It seems to work fine on my minutes charts, but as I wrote, it's not a production release.

This sounds good sam. Can you make the news priority level configurable? I got sacked for 30 ticks on CL by an orange news release. From now on I pay attention to both orange & red!!

Follow me on Twitter Started this thread Reply With Quote
  #26 (permalink)
 
sam028's Avatar
 sam028 
Site Moderator
 
Posts: 3,765 since Jun 2009
Thanks Given: 3,825
Thanks Received: 4,629


cunparis View Post
This sounds good sam. Can you make the news priority level configurable? I got sacked for 30 ticks on CL by an orange news release. From now on I pay attention to both orange & red!!

In the code posted above, just replace
 
Code
                            
string filter_news="Medium|Low|"
by
 
Code
                            
string filter_news="Low|"
And for filtering by currencies, until I've added some customizable parameterd, you'll have to play with
 
Code
                            
Regex r1 = new Regex("^EUR"); 

. In this example, we only get the news which concerns EUR.
I'm getting and parsing a csv file downloaded here, and their are many news, most of them are Forex oriented, and having too many alerts is not a good idea.
The good idea is maybe having a matrix, a table or something, which links the contract(s) traded with the news.

Follow me on Twitter Reply With Quote
  #27 (permalink)
 
Mindset's Avatar
 Mindset 
Singapore
 
Experience: Intermediate
Platform: NT
Broker: ib
Trading: MES
Posts: 365 since Sep 2009
Thanks Given: 90
Thanks Received: 291

Do I need to add a using directive to use regex?

Reply With Quote
  #28 (permalink)
 
sam028's Avatar
 sam028 
Site Moderator
 
Posts: 3,765 since Jun 2009
Thanks Given: 3,825
Thanks Received: 4,629


Mindset View Post
Do I need to add a using directive to use regex?

Yes:

using System.Text.RegularExpressions;

Follow me on Twitter Reply With Quote
Thanked by:




Last Updated on September 23, 2009


© 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