finalized EMA trading and added automatic trading