Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Johnthom- firstly let me say how grateful I am for you work in this indicator as it has saved me the hassle of keeping forex factory open and constantly checking things other than my charts.
I know nothing about programming except some stupid wizard stuff and as yet my trading has not brought in money so I am super grateful for people like you who are willing to share stuff for free.
I had the same issue the other day with this indicator ( at least I presume so) all the symptoms are the same.
I have win 7 64bit and I just reinstalled NT7 beta 3 and have been waiting for some news to pop up in the window. So far nothing.
So am I basically just waiting for a connecton to the FF server to start up again? Or do I need to download a differnt news reader indicator?
Thanks again
doppio
This is too easy an answer. This case is interesting, because it tells us something about the architecture of NinjaTrader and also teaches us how to do proper coding.
I think it is no problem, if an indicator does not work for whatever reason. But this indicator led to a full-blown NinjaTrader crash, even if it was not used. Also it took me hours to identify it as the culprit, as it did not throw any exceptions. This should not happen.
Opening the indicator dialogue box of a chart
When opening the indicator dialogue in Ninjatrader part of the code of the indicators is already executed. I assume that this part is the code contained in the Variables and Properties Regions. After all, for being able to add an indicator, the properties need to be shown in the dialogue box just for allowing to select the appropriate parameters. This means that the variables of the indicator are called at this moment.
So it is extremely important not to write any potentially poisonous code into these sections, as it may crash NinjaTrader.
This also tells us that the indicator does create the problem prior to its Initialization at the stage where the variables are declared.
Modifying the code
There is only one line where variables are declared that can cause such a problem, which is
Replacing this line with
and
solves the problem.
Results
With the above modifcations
- the indicator does not crash NinjaTrader
- can be added to a chart and will display a news load error
- will throw a proper exception to the Print File (System.UriFormatException)
Conclusions
This is a wonderful example for beginning coders - who are not yet programmers - to learn how to avoid trouble:
(1) Don't use any potentially poisonous code when declaring variables.
(2) NinjaTrader has a nice place called OnStartUp(), where the dirty stuff can be done after initialization.
(3) Use try{} catch{}, just in case something goes wrong.
The ForexFactory site feed is still down. Not sure why. But this will present the same issue with either indicator. Fortunately the add-in version has a secondary feed from DailyFx that still works fine. Perhaps Fat Tails can take on the task of converting the old version to use the DailyFX feed???
I did try to load the FF feed xml directly from the FF web site and got the same result. So I don't know if they are discontinuing the feed or what's up. I'd email them to ask but they never bother responding so I won't waste my time. For US news events the DailyFX is just as good as FF and has historical "actual" values as well.
Interesting. Not sure why declaring and initializing a class-level variable would make any difference. When .net creates a class instance all class-level variables are initialized before any constructors or methods, private or public can be accessed. So I don't understand how this makes a difference but if it does I'm glad to hear it. I have never, in my experience, see a case where setting a string variable to a string can crash something. Frankly it makes me question exactly what NT is doing to the class loader. Since the beta version is using a new obfuscater (CliSecure). I'm guess that this is somehow breaking some rules around class loading in order to implement their obfuscation stuff. Don't know, but it is certainly strange.
I did try to load the FF feed xml directly from the FF web site and got the same result. So I don't know if they are discontinuing the feed or what's up. I'd email them to ask but they never bother responding so I won't waste my time. For US news events the DailyFX is just as good as FF and has historical "actual" values as well.
Hello, thanks for your indicator. Maybe you can set the default then to DailyFX instead of forexfactory otherwise you will have a bunch of people installing your indicator and thinking it's not working.
Hello, thanks for your indicator. Maybe you can set the default then to DailyFX instead of forexfactory otherwise you will have a bunch of people installing your indicator and thinking it's not working.
The ForexFactory source for News Events Feeds is still still down. Have sent an email to Twee at FF asking if this is a permanent issue or something that will be fixed. Have not heard back yet.
The ForexFactory site feed is still down. Not sure why. But this will present the same issue with either indicator. Fortunately the add-in version has a secondary feed from DailyFx that still works fine. Perhaps Fat Tails can take on the task of converting the old version to use the DailyFX feed???