NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Sunday May 26th at 12PM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


Go Back   NinjaTrader Support Forum > NinjaScript Development Support > Indicator Development

Indicator Development Support for the development of custom indicators using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 02-11-2007, 01:44 PM   #1
bmaltz
Senior Member
 
Join Date: Nov 2006
Location: , ,
Posts: 110
Thanks: 0
Thanked 0 times in 0 posts
Post imported post

I have an indicator that was working fine in NT6 beta ver 6, but now in beta 7 I'm getting an error that says:

The namespace 'NinjaTrader.Strategy' already contains a definition for 'DefaultFillType'

The error occurs in the following line:


public
class DefaultFillType : FillType

Any ideas on a fix?



Thanks,

Ben
bmaltz is offline  
Reply With Quote
Old 02-11-2007, 01:55 PM   #2
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
Post imported post

Have you added a class with that name in a new file? Problem is that there is a file that hasthat has DefaultFillType as a class name in addition to the @DefaultFillType.cs located under /Custom/Types. I suspect you might even have this file duplicated under /Indicator folder?

Ray
NinjaTrader_Ray is offline  
Reply With Quote
Old 02-11-2007, 02:25 PM   #3
bmaltz
Senior Member
 
Join Date: Nov 2006
Location: , ,
Posts: 110
Thanks: 0
Thanked 0 times in 0 posts
Post imported post

I have 2 files with very similar names in my /bin/custom/type folder. these files are:

@DefaultFillType.cs

@DefaultlFillType.cs <<-- notice the extra "l' after "Default"

Are both of these files supposed to be there?

Also, I now get 2 error messages (the same one as before, just 2 of them now).

When I double click on one of the errors at the bottom of the edit window for my indicator, the edit windows changes to the file: @DefaultFillType.cs

If I click on the 2nd error, the edit windows changes to the file: @DefaultlFillType.cs

As far as I can tell, these 2 files ( @DefaultFillType.cs and @DefaultlFillType.cs ) are the only files that have the term DefaultFillType in them. My indicator file does NOT have this word in it.

Thanks,
Ben
bmaltz is offline  
Reply With Quote
Old 02-11-2007, 03:23 PM   #4
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
Post imported post

Strange.

Delete @DefaultlFillType.cs <<-- notice the extra "l' after "Default"

Ray
NinjaTrader_Ray is offline  
Reply With Quote
Old 02-12-2007, 08:43 AM   #5
bmaltz
Senior Member
 
Join Date: Nov 2006
Location: , ,
Posts: 110
Thanks: 0
Thanked 0 times in 0 posts
Post imported post

I think I tried that last night.After deleting the file, when I restarted NT6 the installation routine ran as if I were a new user of NT and it built the NT6 folders under "My Documents". The result of this was that the @DefaultlFillType.cs file got rebuilt.

Ben
bmaltz is offline  
Reply With Quote
Old 02-12-2007, 09:31 AM   #6
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
Post imported post

Delete the one with @DefaultFillType.cs


NinjaTrader_Ray is offline  
Reply With Quote
Old 02-12-2007, 03:47 PM   #7
bmaltz
Senior Member
 
Join Date: Nov 2006
Location: , ,
Posts: 110
Thanks: 0
Thanked 0 times in 0 posts
Post imported post

OK, I deleted @DefaultFillType.cs and left @DefaultlFillType.cs in the folder.

Now I get numerous errors from a different indicator totally unrealted to my indicator file. (see attatched)

What gives? why is this other file creating problems for MY file?

Ben
Attached Images
File Type: gif NT6 Compile errors.png (59.3 KB, 5 views)
bmaltz is offline  
Reply With Quote
Old 02-13-2007, 12:16 AM   #8
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Post imported post

I suggest starting from scratch since likely the installation now is screwed up:
- copy your current <My documents>\NinjaTrader 6 folder to save it to a different name
- uninstall NT6
- manually remove the <My documents>\NinjaTrader 6 folder
- reinstall NT6
- copy any file you need from your saved folder to freshly created <My documents>\NinjaTrader 6 folder, but do not (!!) copy any file starting with "@"
- restart NT
NinjaTrader_Dierk is offline  
Reply With Quote
Old 03-04-2007, 07:33 PM   #9
Nathamus
Member
 
Join Date: Feb 2007
Location: Germany
Posts: 37
Thanks: 1
Thanked 0 times in 0 posts
Post imported post

I had the same problem after updating from NT6 Beta 7 to NT6 Beta 8 and I was able to solve it:

- go to [your own files]\NinjaTrader 6\bin\Custom\Type
- remove the older file @DefaultFillType.cs
- rename the newer file @DefaultlFillType.cs to @DefaultFillType.cs

without restarting NT6 everything was fine again.

Nathamus
Nathamus is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 02:45 PM.