in ninja trader, there's a built in function called zigzag. for my project, I would like an indicator to sum the volume under each zig zag. if the price is rising, the color bars should be green, if the price is falling, the color bars should be red. the volume bars should build so the current bar is the sum of all previous bars since the zigzag segment began. in the attached file, the volume bars would sum the volume between A and B, and then B and C, and continue for the rest of the zigzag segments. if the retrace value in the zigzag changes, the summed volume should adjust.