Grid bot and buy price set

Hey,

There is something weird when I start a grid and set buy price (of base) at the range high price.

I do that coz base was existing and re used, counting gain of first sells by using bought price is incorrect in this case, and to avoid counting ‘fake gains’, I started setting the buy price with price of the top of the grid.

With this, first sells count for 0 gains which is fine to me.
Then I can’t understand the transaction list, it’s incorrect where completed list is OK.

To easy spot, look at those 3 sell at 11.77 : that’s incorrect. And so there is a matching buy / sell that is weird.

https://app.gainium.io/grid/66c88dc3b28ebddb630826a2

Thanks,
PiX





So because you have set top and initial price to 12.53 and the current price was 11.7730 you would have expected the grid to start with buy orders on the way down and sell orders on the way up?

I mean it is showing sell not at correct price in transactions.

Of course, first order was a sell of existing base (coz going up).

I found that as a workaround, coz else, first buy could be considered very low (Entry price) where it’s not true as already bought the base before start of the bot.

With tests and by looking at gain count, setting high entry price is making original buy inexistant. It means that first sell of any of the initial sell order at startup would be 0 gain (I was expecting to have a negative gain but instead, it’s ignored and gain go to 0 and the transaction contains no buy but a sell with 0 gain (there is gain but not counted…).

This is fine for me but when you look at pictures, you can see than it sold 3 times at 11.77 where it was 2 at that price. It recorded 4 sells where only 3. It’s no more clear as if Entry price stay set as default. It’s not matching what you really see (I mean, the transactions list looks weird).

It sell as expected (no buy as skipped as price higher and negative gains), then second is a buy turn a sell at same price as just before. It should be a second buy.

Well, I can’t explain. It’s like when setting that price higher, there is a fallback that prevent something but without fully implementing a correct solution.

The main point is that I can read the chart and completed list, but the transaction list looks corrupted.

Edit : the last line in last Pic, it should had been a sell coupled with a real buy (coz buy had to buy again after selling before). But it’s not : it’s just a sell without gain and without buy. It’s weird, something has moved somewhere…

1 Like

Lowest is first sell order. Before that order there was no buy match, so its empty
Second is the buy at 6551. For that buy we have found corresponding sell at 7762, so profit calculates between them
Next buy at 5352, there was no sell match, sell column is empty
Next sell at 6552, we have found a amtch form previous filled orders at 6551
And so on. Order could appear in transactions list multiple time. First when no match, second time if the order if the match of corresponding filled.

If its the only problem, so its not a bug. This transactions logic was almost from the beginning

Well, you are correct but still looks weird to read. Order is not preserved as I would expect.

First line is OK.
But second is a buy and sell (order 3 and order 5). Where is the order 2 that is supposed to not match any sell yet?

Anyway, can’t find time to go ahead on that. If it’s looking good for you, then I’m fine.

Thx