This board has been archived, no new registrations are allowed. Please come join us on our discord!

Market Order failing

These bug reports and support issues have been resolved. This section can be used as a reference to resolve any common bugs or support issues.
Jez
Paid Subscriber
Posts: 63
Joined: Fri Oct 03, 2014 8:33 pm

Market Order failing

Postby Jez » Fri Jan 16, 2015 1:22 pm

With regards to the market orders being made - this may still not be working. I'll keep monitoring and update as new orders are made throughout the day - but the first order failed - see log info below. FYI - I am not having any issues with the API at bitstamp - and every api call that has been made since they came back on line has been successful.

I have configured the server's default orders to use market orders, and I have also configured the trade bots to use market orders - see the log output below:

16/01/2015 13:12:12 The order of 1 coins has been cancelled.
16/01/2015 13:12:12 Order sent to order engine: Order d0a2db9d-5199-483b-816c-54a86e3481be: Market Buy 1 Btc @ Bitstamp
16/01/2015 13:12:12 Trying to buy the coins...
16/01/2015 13:12:12 Insurances agree on Buy command
16/01/2015 13:12:12 Indicators are in agreement of a BUY command.

Jez
Paid Subscriber
Posts: 63
Joined: Fri Oct 03, 2014 8:33 pm

Re: Market Order failing

Postby Jez » Fri Jan 16, 2015 2:11 pm

I've also noticed that both the server setting for market orders, and also the market orders setting on each trade bot is not saved - so when the trade server is closed and re-launched - all market order settings are unselected.

User avatar
stephan
Administrator
Posts: 1047
Joined: Fri Sep 12, 2014 9:37 am
Contact:

Re: Market Order failing

Postby stephan » Fri Jan 16, 2015 2:46 pm

Ah yes, i see you have picked up our beta version of 1.3.3 to see if this works. Very good and thank you for doing this!

First let me explain an little whats happening. Bitstamp does not offer native market orders on its API. We work around it using limit orders to get something equal. But its not fully equal because it is hard a limit of the API of course.

At this beta version (v1.3.3) we have tried to place limit order (when a market order is selected) at 50% lower (or higher) then the current price. Logic dictates that if somebody does this the ask/bid orderbook will fill the order with the closest prices. However, for Bitstamp it does not seem to work based on this logic.

To resolve this request, or to get something like the market orders but with better performance is to support trailing orders. Trailing orders are also not native supported, there is almost no exchange who offer this. But, we can make it ourselves and in general i would expect to see better performance from then then market orders.

The essence of a trailing order can be compared to a limit order. Something all exchange do support natively. This is why this concept should work better. With a trailing order you place a buy order (for example) at a slightly higher price. This means the order will be in the orderbook to be executed if the prices goes up again. This should ensure momentum for a buy or sell. In anyway a trailing order goes in at a higher price. In time the price will evolve and if it goes down the trailing/limit order will be cancelled and set to another price. Again close to the buy price using the same methods and assumptions.

in the end 2 things can happen, or the order was executed at a price which is not fully profitable, but you are in the trend. Or more momentum will be fetched and the price is getting better and better.

Do you think this suggestion is the solution for you? If so i am prepared to try to rush this to get it supported.
Join the telegram group too: https://t.me/haasonlineofficial

Jez
Paid Subscriber
Posts: 63
Joined: Fri Oct 03, 2014 8:33 pm

Re: Market Order failing

Postby Jez » Fri Jan 16, 2015 3:18 pm

Stephan - can you clarify if the trailing order is a supported feature if bitstamp - your message below says it is and it isn't. I'm guessing that the only way you can implement a trailing order, is by the trade server checking the price and placing the order.

Before going down this route - can you confirm the interval period at which the trade server gets the prices from the exchange, and, how quickly can it respond to the change in market. I have configured trade bots using a script to respond to all sorts of peaks and dips in the price, but to get the very best possible price on very fast changes, the only way to guarantee a successful trade is to perform a market order. If what you're suggesting cannot achieve this - then I don't see this as being the best option. This week - there has been raid changes in price - sometimes 5 percent in a couple of minutes. When this occurs, the odds are very much probable that it will bounce somewhat back - but you only gain from that by responding to the drop as quickly as possible. The longer it takes to go in, the order price becomes less advantageous.

I think it's also probably worth mentioning, that the bots I have configured, are many many bots that respond to a specific event in the market over a specific time frame, some work on a very short time frame with the frequent peaks and dips, and others work of much longer time periods but with larger amounts of funds to use. Therefore, each bot is using either the 'Force Bot to Bought' or 'Force bot to Sold' position. To prevent each of these bots placing orders each minute, the script I am using triggers a buy or sell for 1 minute only, and then won't initiate another buy or sell until the script resets the trigger using logic in the script. It is therefore critical to the script logic, that the order occurs from that single buy or sell signal.

I hope this makes sense - if you can therefore please confirm that what you are suggesting will guarantee without failure at all, will perform the same as a market order, as if I trade manually, I can achieve a market order every time by just setting the price to be much higher or much lower than the current price depending on if I'm buying or selling.


EDIT - I've just re-read your post - and see that you say trailing orders aren't supported at the exchange as I thought - but that limit orders are. I am therefore concerned by going with your suggestion due to the additional time it will take from when my bot says buy or sell - to performing the extra api calls it will need to respond to if the market has changed since the order was made.

Jez
Paid Subscriber
Posts: 63
Joined: Fri Oct 03, 2014 8:33 pm

Re: Market Order failing

Postby Jez » Fri Jan 16, 2015 3:55 pm

I have now confirmed at least the 2nd order has failed. There may have been more - but I definitely the most recent one has, and so far - there have been no successful orders from the trade bot to be filled.

I suspect it's not related - but I get a lot of errors as shown below:

2015-16-01 15:48:21 |ERROR| Invoke or BeginInvoke cannot be called on a control until the window handle has been created.
2015-16-01 15:48:21 |DEBUG| System.InvalidOperationException: Invoke or BeginInvoke cannot be called on a control until the window handle has been created.
at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
at TradeServer.Application.View.Classic.Controls.ChartControl.HaasbotChart.a(Object A_0, ElapsedEventArgs A_1)

Within the BOT log itself I see a lot of the following errors:

16/01/2015 15:44:20 Warning: Something went wrong during a trade indicator update. Different settings or another trade indicator is advised.
16/01/2015 15:44:20 Checking at price 208.98 Usd

I am seeing the above occur every minute. However, when I look in the Price and Response chart, and also in the Indicator results charts, the script is working correctly, graphs are displaying the correct information, and the price and response chart is showing when a buy or sell signal is sent. I can provide screenshots if nessecary to show the output as described - so I don't know if the above error is related to the fact 'm using a script or if it's being caused by something else, but everything looks correct. I also have enough funds on both sides of the coin position for every bot I have to function.

Jez
Paid Subscriber
Posts: 63
Joined: Fri Oct 03, 2014 8:33 pm

Re: Market Order failing

Postby Jez » Fri Jan 16, 2015 4:31 pm

I think that the above indicator errors are occurring when ever a scrpt inidicator is being used. I have a very simple script as a template, which only returns the current bid and ask prices to the indicator charts - and also only ever returns a stay signal - and on a tradebot with only the one indicator using this script I get these error messages. However, on a tradebot without a script indicator - I don't get these error messages. Can you confirm that using a script indicator is working correctly and is not causing any adverse affects - and can you confirm if you are also getting these messages when using a script indicator.

Jez
Paid Subscriber
Posts: 63
Joined: Fri Oct 03, 2014 8:33 pm

Re: Market Order failing

Postby Jez » Fri Jan 16, 2015 4:51 pm

Just to confirm how serious I see this - my script is working exactly as it should be, and is returning the signals I expected. I've had these bots running for almost 36 hours - and due to this issue - I've only had 2 orders go through in that time - when there should have been about 30 orders. During this time, had all of the orders gone through - I would have made quite a lot of money - we are talking a minimum of a couple of thousand of dollars in that time based on how much funds I have available and assigned to the different bots.

So whilst I am not technically loosing money - I am loosing profits that I could be making.

User avatar
cryptocrooks
Beta Tester
Posts: 63
Joined: Wed Oct 01, 2014 7:31 pm
Location: NYC
Contact:

Re: Market Order failing

Postby cryptocrooks » Fri Jan 16, 2015 5:34 pm

stephan wrote:At this beta version (v1.3.3) we have tried to place limit order (when a market order is selected) at 50% lower (or higher) then the current price. Logic dictates that if somebody does this the ask/bid orderbook will fill the order with the closest prices. However, for Bitstamp it does not seem to work based on this logic.


Are you saying that we'll be able to adjust how the limit price is calculated for the order? If not, it's a great idea.
----
Image
Our blog and website!
http://www.cryptocrooks.com
Helping you find your way with bitcoin, from buying to securing and beyond!

Jez
Paid Subscriber
Posts: 63
Joined: Fri Oct 03, 2014 8:33 pm

Re: Market Order failing

Postby Jez » Fri Jan 16, 2015 6:34 pm

No - this was not the reason for doing this. Basically - Bitstamp doesn't support a market order - only a limit order. The result of this is, is that when the tradeserver places it's limit order, it does so based on the current price, however, on a fast moving market - the result is that the order is made, but when the market is moving fast, the order sits there and looses out on the best possible price.

I've completed a script yesterday that gets me as close to the best possible prices - but as soon as I activated the bots, I was very upset to discover that my orders were getting placed, but just sat there whilst I lost out to the best price. So, I suggested that the best way to deal with this would be that when making a buy order, set the price higher than the current price to ensure the order is met just like a market order, and likewise, when making a sell order, set the price lower than the current price so that the order is met straight away.

The guys provided me with a beta update today that should have fixed this - but very sadly it hasn't, as it now fails to make even place the order.

My biggest concern is that should I have not done the amount of testing I've done, I may not have realised, and may have been in a false sense of security over a safety getting me out of a market crash as soon as possible, but if trading on an exchange that doesn't support a market order with the current live trade server version, the probability of the safety getting you out of the crash at the time it's sent a signal is between quite slim and zero if the market is moving fast, and won't achieve it's purpose until the crash has paused enough for the trade server to catch up with it's limit order.

So I see this as being a major issue that needs to be fixed as soon as possible. I understand the dev guys have taken this on as a top priority with the urgency it deserves.

User avatar
cryptocrooks
Beta Tester
Posts: 63
Joined: Wed Oct 01, 2014 7:31 pm
Location: NYC
Contact:

Re: Market Order failing

Postby cryptocrooks » Fri Jan 16, 2015 6:46 pm

Jez wrote:I've completed a script yesterday that gets me as close to the best possible prices - but as soon as I activated the bots, I was very upset to discover that my orders were getting placed, but just sat there whilst I lost out to the best price. So, I suggested that the best way to deal with this would be that when making a buy order, set the price higher than the current price to ensure the order is met just like a market order, and likewise, when making a sell order, set the price lower than the current price so that the order is met straight away.
.


I've been using BTCe as a test and orders are completed pretty quickly, although I hadn't noticed the price change in relation. I would get around your problem by using a fixedpricechange insurance, I suppose that's a workaround? hahaha
----
Image
Our blog and website!
http://www.cryptocrooks.com
Helping you find your way with bitcoin, from buying to securing and beyond!


Return to “Resolved Issues”

Who is online

Users browsing this forum: No registered users and 1 guest