Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Output info in Studio Express

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Output info in Studio Express

    In the output info below where it says Skipped loading symbols, what is happening there? Is it saying it's not loading or recognizing the symbols I've Added in the Initialize() section?

    'NinjaTrader.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\assembly\GAC_32\mscorlib\2.0.0.0__b77a 5c561934e089\mscorlib.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

    'NinjaTrader.exe' (Managed (v2.0.50727)): Loaded 'C:\Program Files (x86)\NinjaTrader 7\bin\NinjaTrader.exe', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.



    Below is the method by which I'm attempting to Add the stocks....

    Code:
    public class StockEntry
    {
      public string Name;
      public PeriodType Period;
      public int Value;
      public int Count;
    
    public StockEntry(string Name, PeriodType Period, int Value, int Count)
    {
    	this.Name = Name;
    	this.Period = Period;
    	this.Value = Value;
    	this.Count = Count;
    }
    	
    }
    List<StockEntry> _stocks = new List<StockEntry>();
    
     protected override void Initialize()
     {						
    			
    _stocks.Add(new StockEntry("ABC", PeriodType.Minute, 5, 0));			
    _stocks.Add(new StockEntry("ACE", PeriodType.Minute, 5, 0));
    _stocks.Add(new StockEntry("ACN", PeriodType.Minute, 5, 0));
    _stocks.Add(new StockEntry("ADT", PeriodType.Minute, 5, 0));
    _stocks.Add(new StockEntry("SCTY", PeriodType.Minute, 5, 0));
    
    }
    Last edited by zachj; 10-03-2013, 08:20 PM.

    #2
    Zachj, those messages are not related to your adding symbols in Initialize(), but your DLL symbol files not loaded as the Just code option is selected...

    BertrandNinjaTrader Customer Service

    Comment


      #3
      Is there any issues you would see with Adding stock symbols as I have through the List below? Just wanting to confirm this method will still assign ticker ABC to Index 1, ACE to Index 2 and so on...

      Comment


        #4
        You mean adding to your list or the script in NT?
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Well both I guess. Maybe I'm not understanding your question. Just wanted to make sure each stock is getting an Index value. "ABC" Index 1 etc.. and also being added to the list.

          Comment


            #6
            We would not really have support for those more general C# questions or dynamic adding of symbols, however the call you have would not call the Add() method in NinjaScript for adding in the instruments to the strategy script. Since the Initialize() could be called multiple times, I would probably look to fill your list / dictionary in the OnStartUp() instead and add instruments in Initialize() via the supported Add() method call.
            BertrandNinjaTrader Customer Service

            Comment


              #7
              When Add("ABC"..) is used, is it basically just pulling that instrument from the instrument manager database or where is it pulling it from?

              Comment


                #8
                That would work with your local database file in Ninjatrader, which is managed through the Instrument Manager then.
                BertrandNinjaTrader Customer Service

                Comment


                  #9
                  So when I use... _stocks.Add(new StockEntry("ABC", PeriodType.Minute, 5, 0));

                  All this is doing is adding it to the List file and it's Not pulling "ABC" from the local database correct? Therefore not being assigned an Index?

                  Comment


                    #10
                    Correct, it's your list's add method and not the NS Add() method.
                    BertrandNinjaTrader Customer Service

                    Comment


                      #11
                      Just a follow up to this. Is there anyway to confirm whether the data for the added instruments is being pulled in by the script or not? Any thing I can send to the Output to confirm maybe?

                      Comment


                        #12
                        You could look into adding a check in your OnStartUp() or OnBarUpdate() to determine the presence of your series - for example in our MTF Sample we had one series, which makes for a total of 2 :

                        protected override void OnStartUp()
                        {
                        Print("We have "+ BarsArray.Length + " Series: " + BarsArray[0].Instrument.FullName + " " + BarsArray[1].Instrument.FullName);
                        }

                        Note: this uses undocumented techniques, but should get you the result seeked.
                        BertrandNinjaTrader Customer Service

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by frslvr, 04-11-2024, 07:26 AM
                        7 responses
                        109 views
                        1 like
                        Last Post caryc123  
                        Started by rocketman7, Today, 09:41 AM
                        3 responses
                        8 views
                        0 likes
                        Last Post NinjaTrader_Jesse  
                        Started by traderqz, Today, 09:44 AM
                        2 responses
                        5 views
                        0 likes
                        Last Post NinjaTrader_Gaby  
                        Started by stafe, 04-15-2024, 08:34 PM
                        8 responses
                        41 views
                        0 likes
                        Last Post stafe
                        by stafe
                         
                        Started by rocketman7, Today, 02:12 AM
                        7 responses
                        31 views
                        0 likes
                        Last Post NinjaTrader_ChelseaB  
                        Working...
                        X