![]() |
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
|
|||||||
| General Programming General NinjaScript programming questions. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Nov 2009
Location: Frankfurt, Germany
Posts: 9
Thanks: 0
Thanked 0 times in 0 posts
|
Hi,
I created a new strategy with the wizard and added using System.Collections; ... HashTable foo=new HashTable(); Intellisense knows HashTable but I get CS0246. According to Google System.Collections is part of System.dll which is listed in my references (rightclick, refs). Whats wrong? |
|
|
|
|
|
#2 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
dilbert67,
Please provide the full error message. Thank you.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Nov 2009
Location: Frankfurt, Germany
Posts: 9
Thanks: 0
Thanked 0 times in 0 posts
|
hi,
the localized msg is "Strategy\MyCustomStrategy2.cs Der Typ- oder Namespacename HashTable konnte nicht gefunden werden. (Fehlt eine using-Direktive oder ein Assemblyverweis?) CS0246 - click for info 30 3" eg "type or namespacename hashtable cannot be found (Missing using directive or assembly ref?) ##################### #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.Gui.Chart; using NinjaTrader.Strategy; #endregion using System.Collections; // This namespace holds all strategies and is required. Do not change it. namespace NinjaTrader.Strategy { /// <summary> /// Enter the description of your strategy here /// </summary> [Description("Enter the description of your strategy here")] public class MyCustomStrategy2 : Strategy { #region Variables // Wizard generated variables private int myInput0 = 1; // Default setting for MyInput0 // User defined variables (add any user defined variables below) #endregion HashTable foo; /// <summary> /// This method is used to configure the strategy and is called once before any strategy method is called. /// </summary> protected override void Initialize() { CalculateOnBarClose = true; } /// <summary> /// Called on each bar update event (incoming tick) /// </summary> protected override void OnBarUpdate() { } #region Properties [Description("")] [Category("Parameters")] public int MyInput0 { get { return myInput0; } set { myInput0 = Math.Max(1, value); } } #endregion } } ##################### |
|
|
|
|
|
#4 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
Please try Hashtable without the capital T.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Nov 2009
Location: Frankfurt, Germany
Posts: 9
Thanks: 0
Thanked 0 times in 0 posts
|
i guess i qualified as the idiot of the week
:-) thanks anyway |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| System parameters. | Davizito | General Programming | 4 | 10-22-2009 12:07 PM |
| My System | peterdias77 | Strategy Development | 5 | 02-02-2009 07:22 AM |
| Bar price collections in GetMinMaxValues() | windcatcher | Indicator Development | 2 | 08-02-2008 12:50 PM |
| Editor Bug - Intellisence doesn't work properly with Generics Collections | shawnj | General Programming | 2 | 05-26-2008 10:16 PM |
| windows collections | cls71 | General Programming | 1 | 03-26-2008 04:20 AM |