Consulting

Results 1 to 2 of 2

Thread: vba algorithm

  1. #1

    vba algorithm

    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
    Last edited by SamT; 03-19-2018 at 01:15 PM. Reason: Added vbCrLf's

  2. #2
    Knowledge Base Approver VBAX Wizard
    Joined
    Apr 2012
    Posts
    5,645
    I agree.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •