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

Serialization Bug

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

    Serialization Bug

    I finally nailed down this serialization bug. It looks like the NT coders just like using the List<> and ArrayList data structures .

    Please add serialization for:

    Queue<>, Dictionary<>, SortedDictionary<>, Stack<>, SortedList<>, LinkedList<>


    The following indicator generates a serialization error when you try to save it in a workspace:


    Code:
    using System.Collections;
    using System.Collections.Generic;
    
    namespace NinjaTrader.Indicator
    {
        public class aaaTestSerialize : Indicator
        {
    	//public List<int> FMyThings = new List<int>(); //OK
    	//public ArrayList FMyThings = new ArrayList(); //nongenerics  //OK - of course ;)
    		
    	public Queue<int> FMyThings = new Queue<int>(); //Fails
    	//public Queue FMyThings = new Queue();  //nongenerics //Fails
    	//public Dictionary<string,int> FMyThings = new Dictionary<string,int>(); //Fails
    	//public SortedDictionary<string,int> FMyThings = new SortedDictionary<string,int>(); //Fails
    	//public Stack<int> FMyThings = new Stack<int>(); //Fails
    	//public SortedList<string,int> FMyThings = new SortedList<string,int>(); //Fails
    	//public LinkedList<int> FMyThings = new LinkedList<int>(); //Fails 
    		
            protected override void Initialize()
            {} 
            protected override void OnBarUpdate()
            {} 
        }
    }
    Last edited by shawnj; 12-03-2008, 03:11 PM.

    #2
    Thanks for your suggestion. We'll add it to the list of future considerations.

    Comment


      #3
      with Font variables like input parameters, Serialization doesn't work neither.

      Comment


        #4
        Hi,

        It cannot serialize multidimensional array as well .

        we are using multidimensional arrays all the time.

        This is a real problem

        Please add it

        Comment


          #5
          Hello EmmanuelEv1,

          Thanks for your post and welcome to the NinjaTrader Forums.

          I see you have posted in the NinjaTrader 7 section of the Forums.

          To clarify, what version of NinjaTrader are you using? This could be found in the Control Center > Help > About window.

          Are you using NinjaTrader 7 or NinjaTrader 8 and want to serialize a multi-dimensional array?

          We look forward to assisting further.
          Brandon H.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by r68cervera, Today, 05:29 AM
          0 responses
          3 views
          0 likes
          Last Post r68cervera  
          Started by geddyisodin, Today, 05:20 AM
          0 responses
          4 views
          0 likes
          Last Post geddyisodin  
          Started by JonesJoker, 04-22-2024, 12:23 PM
          6 responses
          35 views
          0 likes
          Last Post JonesJoker  
          Started by GussJ, 03-04-2020, 03:11 PM
          12 responses
          3,239 views
          0 likes
          Last Post Leafcutter  
          Started by AveryFlynn, Today, 04:57 AM
          0 responses
          7 views
          0 likes
          Last Post AveryFlynn  
          Working...
          X