I have been developing an indicator for a few months now. I am using NT7-64 bit and Visual Studio 2010. My Indicator uses 3 SMAs internally. I also duplicate those SMAs on the chart so that I can see them.
Just after I got an error loading my indicator, when I subsequently compile my indicator, it no longer shows as a loadable indicator from the Chart menu, despite the fact that the file 'indicatorname.cs' is still in the bin/custom/indicator directory. It compiles fine...it just doesn't show up as available to load on a chart anymore.
The sequence first started when I did a 'reload ninjascript' and got an error message (two identical) to the effect that an SMA was failing and that the problem was probably that the script was no longer available. I looked at the chart and, sure enough, one of the 3 SMAs was not there (so the identical period internal SMA that my indicator uses may have been having a problem as well). When I went to Chart/Indicators I noticed that there were two missing indicators: one of the SMAs and my indicator. I simply added the missing period SMA back via 'SMA/NEW' with no problem (so the indicator was really still present in the system).
To add my indicator back, I just compiled it again, expecting it to reappear in the list of loadable chart indicators. It compiles fine but does not appear in the list of loadable chart indicators.
I then tried to create a new test indicator just from the initial Wizard generated code...the test indicator shows up fine.
I have tried the following things to fix the problem, all to no avail:
1. reinstall ninjatrader
2. add an '@' to the beginning of the file name for my indicator
3. cut and paste my indicator code over a newly generated wizard script (that had the same name as my indicator)...I really expeced this to work since I can just use the wizard script code and the indicator shows up fine.
Item #3 suggests to me that the problem is in my code and that I have done something that is preventing the indicator from being loaded into an object library or something like that; however, it compiles fine and whatever the last change I made was certainly supposed to be something simple.
Note though that the sequence of events was that:
1. I 'reloaded ninjascript' and got 2 SMA errors (one 'external' displayed on the chart and one 'internal' that my indicator uses).
2. I added back the 'external' SMA to my chart with no problem
3. I recompiled my indicator, expecting it to show up...it did not.
4. Note that in the sequence of events 1-3 just above, there were no coding changes
I restored a previous 'saved' version of the indicator and I can run it fine and I have compared all of the changes between the previous saved version and the current version, and do not see anything but normal coding changes.
So how can my indicator compile correctly and not show up in the list of loadable indicators? Was silly or stupid thing could I have done?
Thanks....I'm kinda stuck on this one.
Comment