Profile Picture

Global Dictionary

Posted By vitor dantas 8 Years Ago
Message
Posted Wednesday October 14 2009
  Hi guys !!!

  I´m tryeing to write a code that need a Dictionary<symbol,double[]> with all the symbols in "Symbols" but i need it to be available to all symbols. ie. All instances of MySymbolScript. it sounds, to me, a bit confusing creating a copy of that dictionary to each symbol and feeding them, too much redundancie to work out !!

I even tried with <string, double>

i tried to create it in MySystem but it doesn´t get availlable in mysymbolScript....   Any idea ????? 

Posted Wednesday October 14 2009
Yes, those are two different scopes. If you need it in both places, you'll have to move up in score (i.e. a global) and work with it that way.

vitor dantas (10/14/2009)
Hi guys !!!

I´m tryeing to write a code that need a Dictionary<symbol,double[]> with all the symbols in "Symbols" but i need it to be available to all symbols. ie. All instances of MySymbolScript. it sounds, to me, a bit confusing creating a copy of that dictionary to each symbol and feeding them, too much redundancie to work out !!

Ieven tried with <string, double>

i tried to create it in MySystem but itdoesn´t getavaillable in mysymbolScript.... Any idea ?????
Posted Wednesday October 14 2009
You can create it as a public property in your MySystem class, then you can refer to it from your symbol scripts using TradingSystem.MyDictionaryProperty (assuming you named your property MyDictionaryProperty).

Daniel
Posted Wednesday October 14 2009
Thank´s a lot !!! It was exactly that !!!


Similar Topics


Reading This Topic


2005-2017 © RightEdge Systems