Previous post reminded me that the need for a dll was due to the problem how old builds of metatrader sorted (or better told - could not sort) multi dimensional arrays
New builds changed that, and here is a version of Spearman rank correlation that does not need the dll and is still fast enough to be used in normal usage