add last N-closing-trade funciton