I am interested in understanding how to mathematically model market interaction to optimize pricing strategy. In my model I have two kinds of knowledge: the market's order book and the price/volume curve. So, I know for any given price how many widgets will change hands at that price on a given day. Note that the price/volume curve changes over time and I cannot predict it into the future, I only know what it is historically.
So, my problem is, given I have a certain number of widgets I would like to sell I have different possibilities: I could sell them immediately at the buy price, or I could put them up for sale at a higher sell price and hope someone buys them. If I put them up for sale, then I need to decide what I should price them at. If I make my sell order the lowest order, then that can have consequences. For example, lets say widgets are buying at 850 each and selling for 900. So, I list my widgets for sale at 885. Other sellers could try to undercut me, modifying their orders to be lower than 885. Another effect is that buyers could lower their buy price. When the guy buying at 850 sees my 885, he could decide the price is coming down, so he might change his buy order to 840. Now, if I change my mind and sell my widgets immediately I will only get 840 for them each, but if I had sold at first I would have made 850. So, I will have lost both time and money.
Given the information I have (order book and price/volume curve), how can I model the situation mathematically to optimize my total profit? Are there well-known theories or models that attempt to solve this problem?