more fixes to the hist_data module, and added roundtrip ideal selling percent gate analysis