awhipp/evetrade

Possible Bug? Perhaps just a question from a newbie.

adam10414 opened this issue · 1 comments

Station.prototype.getItemInfo = function(itemId, buyPrice, sellPrice){
var bestBuyPrice = sellPrice[0][0];
var bestSellPrice = buyPrice[0][0];
for(var i = 0; i < buyPrice.length; i++){
for(var j = 0; j < sellPrice.length; j++){
if(sellPrice[j][0] > bestSellPrice) {
bestSellPrice = sellPrice[j][0];
}
if(buyPrice[i][0] < bestBuyPrice) {
bestBuyPrice = buyPrice[i][0];
}
}
}
var row = {};
buyPrice = bestBuyPrice;
sellPrice = bestSellPrice;

Example

It's listing buy price from sell orders, and sell price to buy orders. While this is expected, all of the buy orders are smaller than the sell orders. (Which is kind of expected if people are smart.)

What I don't understand is how does this tool predict a profit if we're selling the item at a loss?

@adam10414

This function is getting the specific best price (sell and buy) for a specific itemId at a specific region/station.

When it comes to trading within a station, THIS IS NOT for instant earnings unlike hauling.