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)
As an update to my last post and the TrendLine Colours I added, I'm getting the following Error when I save as a chart template having saved the indicator to the chart.
I'm not experienced enough to know what the issue is although the indicator as adjusted runs
without issue.
Any help or suggestions appreciated in the absence of the man from down under. Hopefully he's busy putting in the cappuccino settings.
Here are a few possible causes for this error which i posted in another place:
Uninitialized Object: my script might have declared a variable but i forgot to instantiate it with the 'new' keyword. For example:
To fix this, we typically need to initialize the object using the 'new' keyword:
Null Assignment: my script might have assigned a null value to an object reference, and then tried to use it. For example:
To fix this, i need to assign a valid instance to the object reference before using it:
Null Return Value: my script might be calling a method or property that returns null, and then trying to access a member of that returned value. For example:
To fix this, i should check if the returned value is null before accessing its members:
These are just a few common scenarios that can cause the "Object reference not set to an instance of an object" error.
As you can see, it is not a small job to correct or pinpoint this problem as Ninjatrader does not help you much.
The error message I posted only comes up when I save the chart as a template and doesn't refer to TrenLineColorUp" or "TrendLineColorDn" but for "TrenLineColor" the settings for which I didn't alter at all. I don't get the error if saving as a chart template with the original indicator.
I can't see where I could make any of the suggestions you gave, meaning I should only needed to have added the code in OnStateChange and Properties, which I did and posted earlier. Although I'm clearly missing something. Non the less thank you again for taking the time to help.
Additionally to the error message I posted I get the following listed in NT Output for both "My Version" and the original. It's referring to "CalDailyLevels". I don't think this is caused by my additions, perhaps something 085 is still working on.
As it stands the trendline colour changes I made are working.
Hopefully will be able to verify.
I also hope this isn't interfering with the thread. If so and as and when the code changes have been verified I have no objection to my posts here being removed.
Glad to see activity in the thread, by the way, feel free!
I've also added TrendLine colors in the latest version.
Looking at your code changes, they all look right. I pretty much replicated them and didn't have issues.
The screenshot of the indicator properties you shared shows that TrendLineColor has no assigned color, this is likely the issue.
The line above that you have retained should ensure the color var is initiated and therefore shouldn't be showing blank in the indi properties. Maybe double-check that line is still intact?
In any case, the new version has the TL changes anyway, I'm just curious now.
For some reason, I am really struggling with font-based public properties, probably why I shortcutted this a couple of years ago and hardcoded the size.
See the below code at line 276. Change the "Size = 14" t0 "Size = 18" or larger for a quick fix for larger text.
The TL prices are a good idea, although there is some work in that, Ill let you know if I get to it. Cheers.
Btw on the download page it would be a good idea to edit the text to give a date each update's been made, other than looking at the version number it's hard to know.
Re: the V1004 number, when downloading the zip it's still named V1002.
Re:
These which I thought were mentioned as Tiles.
Perhaps an option to toggle them Off/On only to free up chart space when not needing click on them.
Yes, NexusFi is Glitching. The filename I uploaded is v1004, but downloads as v1002. The contents are consistent with V1004 though so the changes should be there, go figure.
I see what you mean by the tiles/butttons. Prob a massive job, Toggle on/off might be easier, I think I had it at one stage. Im out for the day anyway, thinking about that is for another day.
Yes I also noticed the blank space in settings for the original TrendlineColor.
I've checked as you suggested and I've not changed anything from the original except to the colour "Blue".
I have these (var) in OnStateChange although I see you've removed the original "TrendLineColor" in your latest V1004.
So these seem correct and should mean it's not blank in settings for "TrendLineColor"
If I remove from My Version the var for TrendLineColor and the TrendLineColorUp and TrendLineColorDn in Properties (which you've also removed from V1004) I get this Compile error for line 1485 so I left them in:
With your latest V1004 I guess this isn't relevant now but curious none the less as you say.