Continuous-Time Random Walk with multi-step memory: an application to market dynamics