Pawel,
In the meantime I came up with a non-recursive, fast way to compute level, pre and post order for any rooted tree using J features without performing depth-first search.
To make examples of usage more understandable I used graphviz addon, which is available in Jqt, to visualize example trees.
I put the code with comments and example usage on my github. Just run the following file in Jqt.
Graphviz addon uses external program which may require additional (easy) installation described in JWiki.
I recommend using graphviz with J9.6.