Indicators: News_Plotter

 

News_Plotter:

This indicator displays lines on the chart corresponding to upcoming news events. Customizable.

Author: Desmond ORegan

 

Hi folks, One thing that I've noticed while using this indicator is that the deinit function deletes ALL objects on the chart when removing the indicator. It wasn't an issue for me when programming and testing but has become a bit of a nuisance in "real life". To delete only objects created by the News_Plotter indicator replace the existing deinit function with the following and recompile.

int deinit()
{

int Total = ObjectsTotal();
string String;

for(int i = Total-1; i >= 0; i--)
{
String = ObjectName(i);

if (StringFind(String, "News:",0) >= 0 ) ObjectDelete(String); // deletes Objects which contain "News:" in the name
}

return(0);
}

 

Yap. did the same  ;-)

Very good idea the indicator though! I think it could be easily combined with the "Straddle" EA that trades on news!!

 

Hi Catan,

I think this is a great indicator - congratulations on good work.

My colleague has it working well but I can't get it working on my computer for some reason - I seem to have done everything as per your instructions (changed the file name etc and both in nthe correct folders etc) but get the alert message "News Event File Error" - can't see what is wrong?

I have tried switching off firewalls etc but still the alert message.

Any idea what I might be doing wrong?

Appreciate any thoughts / guidance.

JayGeeHitch

 
JayGeeHitch:

Hi Catan,

I think this is a great indicator - congratulations on good work.

My colleague has it working well but I can't get it working on my computer for some reason - I seem to have done everything as per your instructions (changed the file name etc and both in nthe correct folders etc) but get the alert message "News Event File Error" - can't see what is wrong?

I have tried switching off firewalls etc but still the alert message.

Any idea what I might be doing wrong?

Appreciate any thoughts / guidance.

JayGeeHitch

Hi JayGeeHitch,

Check the "Experts" tab in the Terminal window. There should be more precise error info there. For instance, if the file can't be found or opened the following will appear:

If this is the error your getting double check that the "News.CSV" file actually exists by doing a file search or by manually checking the folders contents by working your way through "Computer" in the Start menu. If the file is there double check the file type by right-clicking on the file icon and checking the properties. I've pasted screenshots of the exact steps involved in downloading. Apologies for going over old ground but I haven't a clue what else it could be!!

 

Thanks Catan I appreciate your assistance - It is more or less working for me now apart from getting an alert "Date Reading Error in Date Function" Obviously dates and time are all important but I just can't see why this alert is showing.

Have you witnessed this alert problem before or can you please advise me on how to correct.

Many thanks in anticipation.

JGH

 
JayGeeHitch:

Thanks Catan I appreciate your assistance - It is more or less working for me now apart from getting an alert "Date Reading Error in Date Function" Obviously dates and time are all important but I just can't see why this alert is showing.

Have you witnessed this alert problem before or can you please advise me on how to correct.

Many thanks in anticipation.

JGH

Hi again JayGeeHitch,

I inserted that error message into the code to warn if an error occured while extracting the Month from the Date string which appears at the start of each News entry in the file. The first valid entry in this weeks file reads:

Sun May 10,,,AUD,AUD RBA Foreign Exchange Transaction (Australian dollar) (APR),Low,,,718M

The code pip-points the "May" in the 1st string (underlined) and gives it a numeric value. If for some reason the text in that position wasn't recognised as a month then an error would be flagged. I've downloaded this week's file and no error occurs. I can only assume that your file got corrupted somehow and the formatting is off slightly. Open the New.csv file and manually check for formatting errors. They should be obvious.

 

I have a better new indicator from forexfactory but dont know how to upload it for all of you.

Jet

 
Jetcity4x:

I have a better new indicator from forexfactory but dont know how to upload it for all of you.

Jet

Hi Jet,

That sounds very interesting - have you any more info on this or made any progress that you ca share with us?

JGH

Reason: