No, the function is correct. The order of period and nth arguments doesn't matter. If you want different order then do it but it does not change end result.
As for function arguments order...
Order would matter if you would write a DLL function via C/C++ ADK of AmiBroker.
Then order of types of function arguments is.... array, string, float
As aside NthHighest function has been posted few months ago (and same there... order of arguments doesn't matter).