PDA

View Full Version : vba algorithm



JazzlikeSwan
03-19-2018, 11:35 AM
Unloading algorithm: You will start out with a position at a cost and you
will need to close that position within 2 minutes.

At that point, you will
be given a second position and will need to close out that position within
another 2 minutes.

To do that, do the following: Set a favorable limit order
of size 5000 which is likely to at least be partially filled.

Then, if you can
submit a favorable market order of size 1000 without changing the bid/ask
spread (or only minimally), do that. (Note: These sizes may change once
your position gets small enough).

When the time until you need to close
your position is less than or equal to the size of your remaining position
in thousands, definitely submit a market order of at least size 1000 (You
should try not to affect the bid-ask spread if possible).

At the start of
each tick cancel any orders. So at each tick, you are submitting a limit
order and possibly a market order (definitely if you are not closing your
position fast enough).

Help with this vba algorithm

snb
03-19-2018, 01:32 PM
I agree.