Introduction
-------------

Ideally this test should be done with a cert connection because the simulator can be quirky.  If you ignore this advice and use sim you must not admit it to anyone.

Only exchange orders will have a PIQ so you should probably just use a Limit order for this test.

General Stuff to Look For:
--------------------------
- The MBO popup is 'live' and should update as the market moves.
- The MBO popup should increase in size if more orders are added while it is open.
- The MBO popup should not shrink when orders are removed. It only grows.
- The scale of the bars is based on the largest order seen by the popup.
    - If a larger order shows up it will scale down the other orders.
    - When the large order goes away it should *not* expand the other bars.  The scale only increases while the popup is open.
    - For example:
        - You open the popup and there are 2 orders of size [1,2]
        - size 1 will be about half way across the available space and 2 will fill the space.
        - An order of size 5 comes around it will fill the available space and the other orders will be 20%, 40% across respectively.
        - If the size 5 order is canceled the [1,2] orders stay at 20%, 40% rather than growing to fill the space.
        - If you close and re-open the popup state is reset and [1,2] will be 50%/100% again.
- Middle clicking on a row with no data does not open the popup.
    - This doesn't mean clicking past the end of the visible book won't show anything.  The MBO tracks much deeper than the market by price.  If there's a gap between 2 prices that's a good spot to test.


Part 1:
-------
- Find a security with a non-empty market that isn't moving too fast.  Cert can be temperamental so open the market view and filter for Qty > 0.
- Open settings and turn on the PIQ column (settings -> Ladder Columns)
- Choose a price near the top of the book and shift + middle click the price column to show the MBO popup. (There must be a size for the popup to show)
- Add up the sizes in the popup and make sure they agree with the total size in the bid or ask column on the ladder.
    - Test both sides of the market near the top and away from the top.
- Enter an order.
    - The PIQ column should reflect the number of orders ahead of you in the queue.  The size in the bid/ask column is how many orders were there when you entered your order so you should expect the PIQ to be the size from before you entered your order.
    When the market moves you should expect your PIQ to go down.  If cert is working correctly your PIQ should never go up.
    - Open the MBO popup.  Your order should be shown in a different color from the other orders at that level.
    - Verify that your order position matches the value from the PIQ column.
    - Test both sides of the market near the top and away from the top.
- Moving your order to a different price or *increasing* the size of your order will move you to the back of the queue.
    - If you ignored the instructions and you're using sim this probably won't work.  You should have listened.
- Reducing the size of your order should not change your queue position.  You might may have to be quick to observe this.

Part 2:
-------
- Open several securities with varying tick sizes and make sure that the MBO popup opens for all levels of the book where there is a size.
- Why? The ladder sends the price you click on to the server and the server must identify the right price level.  As you know, the IEEE double is out to get you.

Part 3:
-------
- The MBO popup should expand either up or down from the mouse position to maximize the available space.
- If the number of orders exceeds the space available the mouse wheel should work to let you scroll up/down to see the rest (up to LadderKnobs.max_mbo_orders which defaults to 200)
- Find a security with enough orders to cause scrolling by either
  - Connect to a demo system with production md and look at a ZN spread (i.e. ZNM9 - ZNU9)
  - Enter a bunch of orders at the level on cert.
  - If you try this on sim (you're not a very good listener, are you?) It will cap out at ExchangeSim.orders_per_level (default:10)
- Make sure that scrolling works.

