Understanding Trading Algorithms: An In-Depth Guide