This might also be a documentation issue -- either way, it appears to me that the rSign variable generated by ZigZag() has the wrong sign. From the online manual for ZigZag():

Quote
Returned: rSlope (the slope of the last identified line; upwards lines have a positive slope, downwards lines a negative slope); rPeak (the bar offset of the last identified peak); rSign (1 if the last peak was a top, -1 if the last peak was a bottom); rLength (the number of bars of the last zig or zag that ends with rPeak)


Unless I misinterpret this, rSlope and rSign should always have the same sign; however, they have opposite signs (in Zorro S 2.25), and rSign appears to contain -1 for a prior top, and 1 for a prior peak. rSlope appears correct. I assume this could be fixed by changing either the documentation (for backwards compatibility) or the implementation...