Market and credits?
-
hi,
just build a market script that sells minerals (shard2), but i got a problem:
i delete alle my "active = false" orders at the end of the tick - maybe created market orders are inactive at creating tick and so i deleted them directly in the same tick?
caus i got 400 market fees in history in just a few ticks and i took all credits i got..
i found nothing in the docs about that, just let me know if i m right
thx
-
From what I recall you are correct. Orders can be inactive but still viable. If there's no amount (room in terminal) for it for example I believe it goes inactive until there is room. Extending an order as well I believe when its out of remainingAmount can re-activate old ones.
You can test to be sure by checking on the status of your order(s) before the ticks end once you create them, or next tick.
You can also add some additional checks to make absolutely sure its one you want to delete, delete them less often or, maybe at the start of the tick instead.
-
@skriiietsch this is correct, orders created in inactive state. As @Donatzor said, there are many cases when an order may become temporarily inactive, so deleting orders for the sole reason of inactivity may be not the best idea.
-
A much better tactic is to only delete order when you're near the 50 (soon to be 300) order limit and then only 10 or so. This give you maximum opportunity to reuse / extend orders to limit losses due to market fees
-
thx 4 answering....
i rebuild it and now it works fine.... even with these "i buy all but 1" joking players i can deal with
thx 4 help