on futures.io I found an indicator from user asfax that should display IB margins. I tried to convert it to NT8 (I attach both versions, the original and my amateur attempt). I have successfully compiled the indicator, but it throws me an error message:
"Indicator 'DownloadMarginsFromInteractiveBrokersWebNT8': Error on calling 'OnStateChange' method: You are accessing an index with a value that is invalid since it is out-of-range. I.E. accessing a series [barsAgo] with a value of 5 when there are only 4 bars on the chart."
I'm a bit stumped because it seems to me that the indicator doesn't actually need any bars to function, so I have no idea how to proceed. Thanks in advance for the help.
emuns
Comment