bug fix for buy/sell csv creation
working state for the moving average trading model