Test Author: Taha
If it breaks: Pedro

The goal of the join order is to watch the opposite-inside market and join when the market flips and 
has at least threshold size. (flip is when the best offer price becomes the best bid, or the market trades 
away from you (the line moves up in the gui))

0. This needs sim market data **not** to be merged with replay (or cert), so we can create our own markets.
Also make sure you have limits to trade SI Future

1. Bring up a ladder, lets say in SIN1 (does not matter which security)

2. Create both sides of the market by entering 10 lot limit orders at 15.550 and 15.575
(if there are no markets use the M View and the ticket to enter)

3. Enter a 5 lot buy Join order with an abs threshold of 1 at 15.525. When the Join order is placed
it takes a snapshot of where the top of the book was. Since its a buy, it will wait for the top of the buy side
to advance to where the ask is AND for qty >= threshold 

4. Verify that a limit order is sent at where the Join is.

5. Now move the ask market up a tick and the bid market to where the ask was (15.575). Verify that the Join
moved its Child limit order to 15.575 ie it joins the bid market.

6. Cancel all orders and put the market to where it was (step 2.)

7. Now an enter a Join order with threshold 15, again at
15.525. Repeat step 5. except that the Join order will not join since
the top of the bid qty threshold of 15 is not met.

8. Increase the top of the bid qty by adding a limit order there at a time. When the qty
reaches 15 it should join.

Updates:
9. Clean the slate and repeat 2. Enter 10 5 lot Join orders at 15.525, with threshold 1000. Once again move the ask one level up (15.580)
and the bid to where the ask was (15.575). The join child orders should stay where they were. Select 7 join orders in the OB, and change
their threshold to 10. These should force their child orders to join the market. The other 3 should be at the same place. For the other 
change their threshold from the miniOB to 10, and they should jump too (these algos will be the only ones with chidl orders in the miniOB)

Attach:
10. Clean the slate and repeat 2. Enter 15 5 lot limit orders, between 15.525 and 15.500. Select them in the OB and attach a join with threshold of 10. Verify
that all these limit orders are now controlled by Joins. Now like 9, move the ask one level up, and the bid to where the ask was. All the joins should
jump and join the bid.

Detach:
11. Select these limit orders from the OB and hit detach. They should all be detached from the parent lean now.

