Access Dictionary from cBot
Access Dictionary from cBot
23 Feb 2017, 06:32
Hi Team,
Excuse me for my ignorance about programming language but i would like to know how to access "public" defined variables or Collections like Dictionary from an Indicator to cBot. I know one can access IndicatorDataSeries but what about other variables, particularly if data structure is more complicated like a collection ( List or Dictionary etc )
[Output("NZDUSD_M5", Color = Colors.Green)] public IndicatorDataSeries NZDUSD_M5 { get; set; } public Dictionary<DateTime, Dictionary<string, int>> DictList_M5 = new Dictionary<DateTime, Dictionary<string, int>>();
my Dictionary(DictList_M5) in my indicator is getting populated properly as i have already checked it but when i try to access it a cBot like below
foreach (KeyValuePair<DateTime, Dictionary<string, int>> kvp in _HM.DictList_M5) { Print("Key = {0}", kvp.Key); }
it gives me nothing ( I have already initialized indicator with correct parameters etc..).
Can somebody please shed some light on it ?
Replies
trend_meanreversion
23 Feb 2017, 12:18
RE:
tmc. said:
Hi, see this: /forum/indicator-support/10973
Perfect. Thanks a lot mate. It it working now :)
@trend_meanreversion
whis.gg
Hi, see this: /forum/indicator-support/1097323 Feb 2017, 12:10
@whis.gg