reordering traces

I am sequentially creating and displaying a large number of traces of two general types. There are fewer of the second type, and when they occur they are interleaved with the first. An example graph is attached.

I would like to have both types of traces on the same graph, but avoid the present distracting Moire-like appearance by putting all the blue traces behind the red ones. To that end, I thought I could use the ReorderTraces operation within my function, but don't see how to combine the result of TraceNameList within the syntax of that operation, to put each blue trace at the bottom as it is added to the display.
RayGraph.png
I would at first blush guess that a best course is to

* display all the traces
* collect them all with TraceNameList
* loop through all to create two sets A - blue, B - red
* loop through only set A to move each to back.

--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAHuntsville
Try also the "Reorder Traces" context menu of the graph. This helps to understand the syntax of ReorderTraces.
Conceivably, it would be easiest to make a provisional graph (the one you showed) and keep a list of A and B waves. Then when it's all done, make a new graph with the correct ordering of the traces.

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
Thanks to all for the suggestions. The help file on ReorderTraces is not the easiest to interpret for this situation, but some basic testing showed a simple solution at each loop instance where a new (blue) trace is added to the graph:

AppendToGraph $rwName
ReorderTraces w0,{$rwName} 

Here w0 is the first (red) trace created in the graph, and $rwName is a unique wave (or trace) name created in my function (e.g. rw2, rw3,...) for the reverse-directed blue traces. This puts all the blue traces behind all the red ones.