Hello, I wanted to test the live functionality of QC using GDAX. However the Liquidate function doesn't seem to work in live mode wih GDAX. The first time the Indicator conditions are met a setholdings() buy order is plaeced and I can see the transaction on my GDAX account. However, when the EMAFast < EMASlow the Liquidate function should be called. I see in the debug logs that even though those conditions are met there is no Liquidate() transaction. Has anyone also observed this? Should I use a different order function (e.g. marketOrder() ? I figured setHoldings() and Liquidate() can't be any simpler... ANy modifications/ suggestions/edits to trade live on GDAX would be greatly appreciated

 

private void MarketOrder(Coin coin, double allocation)
{
Debug("EMA Fast:" + coin.EMAFast + " " + "EMA Slow: " + coin.EMASlow);
Debug("Holdings:" + Portfolio.CashBook["BTC"].Amount);

var openOrders = Transactions.GetOpenOrders(coin.CoinSymbol);
if (openOrders == null || openOrders.Count == 0)
{
if (Portfolio.CashBook["BTC"].Amount == 0 && coin.EMAFast > coin.EMASlow)
{
SetHoldings(coin.CoinSymbol,allocation);
Debug("Bought:" + coin.Price);
}
if (Portfolio.CashBook["BTC"].Amount != 0 && coin.EMAFast < coin.EMASlow)
{
Liquidate(coin.CoinSymbol);
Debug("Sold:" + coin.Price);
}
}
}