NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM 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 07-01-2007, 03:56 AM   #1
grd974
Senior Member
 
Join Date: Apr 2007
Location: , ,
Posts: 124
Thanks: 0
Thanked 0 times in 0 posts
Default Compilation error

After editing a strategy named "FibSound1" I clicked on Finish button then I got "Error on generating Strategy". Under the code, I found this diagnosis :
Description : The namespace 'NinjaTrader.Indicator' already contains a definition for 'DepthReferenceSample'
File : DepthReferenceSample.cs Line : 19 Column : 18

Here are the first lines of my code :

#region Using declarations
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Xml.Serialization;
using NinjaTrader.Cbi;
using NinjaTrader.Data;
using NinjaTrader.Indicator;
using NinjaTrader.Strategy;
#endregion

// This namespace holds all strategies and is required. Do not change it.
namespace NinjaTrader.Strategy
{
/// <summary>
/// Sounds Fibonacci retracements
/// </summary>
[Description("Sounds Fibonacci retracements")]
[Gui.Design.DisplayName("FibSound1")]
public class FibSound1 : Strategy

I went back to Edit and deleted the DepthReferenceSample (that you recently uploaded on this forum). I renewed the compilation and it went right.
I've had this very problem several times before and I did not put it on the forum because I was not sure whether I had imported the DepthReferenceSample properly; but now DepthReference indicator works on my chart and I am sure the problem comes from the compilation process.
grd974 is offline  
Reply With Quote
Old 07-01-2007, 04:10 AM   #2
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
Default

>> The namespace 'NinjaTrader.Indicator' already contains a definition for 'DepthReferenceSample'
Means: there are two different files holding 2 classes with the same name: 'DepthReferenceSample'
NinjaTrader_Dierk is offline  
Reply With Quote
Old 07-01-2007, 05:48 AM   #3
grd974
Senior Member
 
Join Date: Apr 2007
Location: , ,
Posts: 124
Thanks: 0
Thanked 0 times in 0 posts
Default

I've cleaned up my directories and compilation works fine, thanks.
grd974 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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Error on loading chart data: Native error 14 CJ888 Charting 8 07-20-2006 10:16 PM


All times are GMT -6. The time now is 03:33 AM.