Stock market order execution
I used to work on the software in the front office (and a bit of the middle office) of a brokerage firm. This page describes the process pretty well. Basically there are three parts: So to your question: how does an order get executed? ETFs work the same since they are effectively shares of a mutual fund's assets. True mutual fund shares work differently since they don't get traded in the market. They get traded at the end of the market as just a bookkeeping exercise. When you are placing an order with an online broker you should already know what exchange or exchanges that stock trades on. For example if you look up under Yahoo Finance: Notice how News Corp is traded both on the ASX and the Nasdaq. The difference is the shares traded on the ASX have the extension .AX, that is how you know the difference between them. When you are putting orders in with your online broker you will need to select the exchange you wish your order to go to (if your broker allows trading on multiple exchanges). So you should always know which exchange your order goes to.
"If you own a stake large enough to do that, you became regulated - under Section 13(d) of the 1934 Act and Regulation (in case of US stock) and you became regulated. Restricting you from ""shocking"" market. Another thing is that your broker will probably not allow you to execute order like that - directed MKT order for such volume. And market is deeper than anyone could measure - darkpools and HFTs passively waiting for opportunities like that." Stop order is triggered when the market reaches the price you set. Until then - its not on the books. Your understanding is wrong in that you don't go to read the definition of the term. "A market sell order will be filled at the highest current ""bid"" price. For a reasonably liquid stock, there will be several buy orders in line, and the highest bid must be filled first, so there should a very short time between when you place the order and when it is filled.   What could happen is what's called front running. That's when the broker places their own order in front of yours to fulfill the current bid, selling their own stock at the slightly higher price, causing your sale to be filled at a lower price.  This is not only unethical but illegal as well. It is not something you should be concerned about with a large broker.   You should only place a market order when you don't care about minute differences between the current ask and your execution price, but want to guarantee order execution. If you absolutely have to sell at a minimum price, then a limit order is more appropriate, but you run the risk that your limit will not be reached and your order will not be filled. So the risk is a tradeoff between a guaranteed price and a guaranteed execution." Difference between a limit and market order is largely a trade-off between price certainty and timing certainty. If you think the security is already well priced, the downside of a limit order is the price may never hit your limit and keep trading away from you. You'll either spend a lot of time amending your order or sitting around wishing you'd amended your order.  The downside of a market order is you don't know the execution price ahead of time. This is typically more of a issue with illiquid instruments where even smaller orders may have price impact. For small trades in more liquid securities your realized price will often resemble the last traded price. Hope that helps. Both have a purpose, and the best tool for the job will depend on your circumstances. The purpose of a market order is to guarantee that your order gets filled. If you try to place a limit order at the bid or ask, by the time you enter your order the price might have moved and you might need to keep amending your limit order in order to buy or sell, and as such you start chasing the market. A market order will guarantee your order gets executed. Also, an important point to consider, is that market orders are often used in combination with other orders such as conditional orders. For example if you have a stop loss (conditional order) set at say 10% below your buy price, you might want to use a market order to make sure your order gets executed if the price drops 10% and your stop loss gets triggered, making sure that you get out of the stock instead of being stuck with a limit order 10% below your buy price whilst the stock keeps falling further. In general stock markets are very similar to that, however, you can also put in limit orders to say that you will only buy or sell at a given price. These sit in the market for a specified length of time and will be executed when an order arrives that matches the price (or better). Traders who set limit orders are called liquidity (or price) makers as they provide liquidity (i.e. volume to be traded) to be filled later. If there is no counterparty (i.e. buyer to your seller) in the market, a market maker; a large bank or brokerage who is licensed and regulated to do so, will fill your order at some price. That price is based on how much volume (i.e. trading) there is in that stock on average. This is called average daily volume (ADV) and is calculated over varying periods of time; we use ADV30 which is the 30 day average. You can always sell stocks for whatever price you like privately but a market order does not allow you to set your price (you are a price taker) therefore that kind of order will always fill at a market price. As mentioned above limit orders will not fill until the price is hit but will stay on book as long as they aren't filled, expired or cancelled. Thanks for your reply. I’m not familiar with the term “Held-For-Trading Security”. My securities are generally held as collateral against my shorts. To clarify, I am just trying to track the “money in” and “money out” entries in my account for the shorts I write. The transaction is relatively straight forward, except there is a ton of information attached! In simple terms, for the ticker CSR and short contract CSRUQ8, the relevant entries look something like this: There are no entries for expiries. I need to ensure that funds are available for future margin calls and assignments. The sale side using covered calls is as involved. Traders sometimes look at the depth of the book (number of outstanding limit orders) to try and gauge the sentiment of the market or otherwise use this information to formulate their strategy.  If there was a large outstanding buy order at $49.50, there's a decent chance this could increase the price by influencing other traders. However, a limit order at $2 is like an amazon.com price of $200,000 for a book.  It's so far away from realistic that it is ignored.  People would think it is an error. Submitting this type of order is perfectly legal.  If the stock is extremely thinly traded, it might even be encouraged because if someone wanted to sell a bunch and did a really bad job of it, the price could conceivably fall that far and the limit order would be adding liquidity.  I guess.  Your example is pretty extreme. It is not uncommon for there to be limit orders on the book that are not very close to the trading price.  They just sit around.  The majority of trades are done by algorithmic traders and institutional traders and they don't tend to do this, but a retail investor may choose to submit an order like that, just hoping against hope. Also, buy orders are not likely to push prices down, no matter what their price is.  A sell order, yes (even if it isn't executed). Many exchanges trade the same securities.  An order may be posted to a secondary exchange, but if the National Best Bid and Offer data provider malfunctions, only those with data feeds from that exchange will see it. Only the data provider for the primary exchange where a stock is listed provides the NBBO. Missing orders are very common with the NBBO data providers.  NASDAQ's order consolidator has had many failures over the past few years, and the data provider's top executive has recently resigned. Brokers have no control over this system.  A broker may be alerted to a malfunction by an accountholder, but a broker may only inform the relevant exchange and the relevant data provider. Ethereum trades are not subject to the same rules as securities are. Thats the primary flaw in your assessment. Yes, cryptocurrency is a free trading arena where you can actually take advantage of market inefficiencies yourself 24 hours a day, 7 days a week, at massive profits. The equity securities markets are not like that, and can't be used as a comparison. If you have a preference for flexibility, then it is already clear which markets work better for you. Market makers can make stub quotes, brokers can easily block their retail customers from doing it themselves. Even the dubious market manipulation excuse is reference to a sanction exclusive to the equity markets. The idea that it went through a week earlier probably triggered the compliance review. Yes, a broker can refuse to place your limit order. "Stock price is set to the price with the highest transaction volume at any given time.  The stock price you cited was only valid in the last transaction on a specific stock exchange. As such it is more of an ""historic"" value. Next trade will be done with the next biggest volume. Depending on the incoming bids and asks this could be higher or lower, but you can assume it will not be too far off if there is no crash underway. Simple example stock exchange:" Many of the Bitcoin exchanges mimic stock exchanges, though they're much more rudimentary offering only simple buy/sell/cancel orders.  It's fairly normal for retail stock brokerage accounts to allow other sorts of more complex orders, where once a certain criteria is met, (the price falls below some $ threshold, or has a movement greater than some %) then your order is executed.  The space between the current buy order and the current sell order is the bid/ask spread, it's not really about timing.  Person X will buy at $100, person Y will sell at $102.  If both had a price set at $101, they would just transact.  Both parties think they can do a little bit better than the current offer.  The width of the bid/ask spread is not universal by any means.  The current highest buy order and the current lowest sell order, are both the current price.  The current quoted market price is generally the price of the last transaction, whether it's buy or sell. It depends on the way you have directed the order and the execution agreement you have signed with your broker. In case of DMA (direct market access) you would direct your order to the specific exchange - and that exchange would post your offer, assuming you did not tag it as hidden. However, if you just gave your order to the broker (be it via telephone, email or even online), they may not have to display your order to the market or chose which exchange to sell it on. It will also depend where the stock is listed. For most US listed and OTC stocks, regulation NMS applies where your order should have been executed against if it went to the exchanges. Check your account opening docs and agreements, particulary the execution agreement. In there it will tell you how your order should be treated. In case where the broker stipulates that you have DMA or that they will direct your order to Lit markets (public exchanges and not market making firms and dark-pools) then you may have a case - you would need to request information to whcih exchange your broker sent the order to. In case that you gave them discretion on routing of your order - read the fine print. The answer lies there. Regarding NBBO missing you quote as quantycuenta suggested above is also a possibility, however Reg NMS should take care of this. Do you have stock and date & time of your order? "In US public stock markets there is no difference between the actions individual retail traders are ""permitted"" to take and the actions institutional/corporate traders are ""permitted"" to take.  The only difference is the cost of those actions.  For example, if you become a Registered Market Maker on, say, the BATS stock exchange, you'll get some amazing rebates and reduced transaction prices; however, in order to qualify for Registered Market Maker status you have to maintain constant orders in the book for hundreds of equities at significant volumes.  An individual retail trader is certainly permitted to do that, but it's probably too expensive. Algorithmic trading is not the same as automated trading (algorithmic trading can be non-automated, and automated trading can be non-algorithmic), and both can be anywhere from low- to high-frequency.  A low-frequency automated strategy is essentially indistinguishable from a person clicking their mouse several times per day, so: no, from a legal or regulatory perspective there is no special procedure an individual retail trader has to follow before s/he can automate a trading strategy.  (Your broker, on the other hand, may have all sorts of hoops for you to jump through in order to use their automation platform.) Last (but certainly not least) you will almost certainly lose money hand over fist attempting bid-ask scalping as an individual retail trader, whether your approach is algorithmic or not, automated or not.  Why?  Because the only way to succeed at bid-ask scalping is to (a) always be at/near the front of the queue when a price change occurs in your favor, and (b) always cancel your resting orders before they are executed when a price change occurs against you.  Unless your algorithms are smarter than every other algorithm in the industry, an individual retail trader operating through a broker's trading platform cannot react quickly enough to succeed at either of those.  You would have to eschew the broker and buy direct market access to even have a chance, and that's the point at which you're no longer a retail trader. Good luck!" "I think that pattern is impossible, since the attempt to apply the second half would seem to prevent executing the first. Could you rewrite that as ""After the stock rises to $X, start watching for a drop of $Y from peak price; if/when that happens, sell."" Or does that not do what you want? (I'm not going to comment on whether the proposed programmed trading makes sense. Trying to manage things at this level of detail has always struck me as glorified guesswork.)"