Argument out of range means you have an indexer that's accessing a value that isn't there. Most likely you are trying to access a value in the bar element arrays that isn't there yet. Make sure that your array indexer is in range. Also, a line number on the stack trace would be most helpful.
I have designed an indicator plugin to calculate the swings to link the highest and lowest.but it throws an exception.Anything wrong with it.it says out of the range of argument.But i have checked it carefully and cant find what is wrong with it.
By the way,is it the right way to code it that way?