sthewissen / Mynt

An Azure Functions-based crypto currency trading bot; featuring 10 exchanges, 25 indicators, custom strategy support, backtester and more

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CancelUnboughtOrders function

basdroid opened this issue · comments

Hi,
I use your bot to trade (and making profit :-) )
in the CancelUnboughtOrders there is a extra check needed.
if you going to cancel the order you must first check if the order is not partial filled.
if you trade on 15min then not always is the order filled.

foreach (var trade in _activeTrades.Where(x => x.IsBuying))
                {
                    var exchangeOrder = await _api.GetOrder(trade.BuyOrderId, trade.Market);
                    // if this order is PartiallyFilled, don't cancel
                    if (exchangeOrder?.Status == OrderStatus.PartiallyFilled)
                        continue;  // not yet completed so wait

                    // Cancel our open buy order on the exchange.
                    await _api.CancelOrder(trade.BuyOrderId, trade.Market);

etc.

Bas

Fixed in master and develop :) Nice to hear that you're making profit! What kind of settings/strategy are you running?

I make a own strategy its a combination from the scalper and bollingerband trading,
at this moment i'am working on one with the MFI indicatar (testing at this moment, looks oke)

when will the Development version ready for production ?

I'm currently running the paper trader to verify that the logic is correct. Also reworking the back tester which is something that I think is good to have on master. Other than that I think that there's not a whole lot stopping us from going to master soon.

If you have a strategy that you think works you are free to PR it in :)