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)
Error: Object reference not set to an instance of an object.
I have read all threads that I found about this problem, but I didn't find any solution for my particular situation.
I'm trying to find some significant statistical correlations on market (using GraphPad) and for this I use many custom indicators (to get data out of the market).
Here is an indicator which I've coded this days, but when I use it on Market Replay or Sim I get the following error (in Log tab):
Using try-catch I have the following text in my Output Window:
The lines isolated in "try" are as follows:
When Market Replay is playing or market is moving on sim, my chart is going crazy. Look at this 8 Range Chart on CL:
from this i guess its a logical error in indicator construction than usual Initialization or OnStartUp error.
This type had happened with me in past , throwing error on different bars..some time indic working and some time shewed error. In end , in my case it turned out logical error in indicator.
Uggghhh - this error... seriously - in the year 2011, is this the best we can get.
I have 2 bug bears with this type of error. First - it gets reported as an error in "OnBarUpdate" event but it could actually be in any method called from within OnBarUpdate - which in most cases can be pretty much anywhere.
The other thing is it's a generic message - .NET must know the object in question but doesn't tell us what it is...
ugghhh...
Anyway - I think you are looking for past values on the high, open & close, right:
if (Close[i] > Open[i-2] && High[i-2] < Close[i-8])
Shouldn't this be:
if (Close[i] > Open[i+2] && High[i+2] < Close[i+8]) ????
If i = 0, then your Close[i-8] is going to be resolve to Close[-8] - is that looking for 8 bars in the future ???? To look 8 bars back, you would do Close[8]. So - if you look further back, you need to add to i.