Before buying I got a question regarding the profit calculation. It seems to me that most of the bots calculate this wrong. Lets say you want to buy 1000 xrp, the highest buy order is 0.1219, you set the buy order at 0.1220 and manage to buy 250 xrp then the price rises and you buy another 300 at 0.1224 it then rises again and you buy another 150 at 0.1229 and another 300 at 0.1231.
Now the weighted average is 0.122585 ((250×0.1220+300×0.1224+150×0.1229+300×0.1231) / (250+300+150+300) = 0.122585) of the buy orders. However I assume that GUNBOT will sell once it sees that it bought something. Lets say the first 2 orders ( the 250 and 300) get sold at 0.1314 and the other 2 (150 and 300) get sold at 0.1311.
Can you tell me what GUNBOT does to calculate these profits? I assume it will use the history api for this to check if it bought and sold?