Automation for FAST closing of all positions in IB

Discussion in 'Automated Trading' started by scalpmaster, Nov 22, 2007.

  1. I have a simple TRIN dependent scalping system where the Net P/L will oscillate consistently between +$100 to -$100 as seen on IB's platform extra top row total USD unrealised P/L (need to check the box 'total' in "settings->Display")

    However, the oscillation can be sometimes too fast to take profit manually by mouse.

    All I need is a simple automated script (through the fastest possible API method, C++,Java,etc) that allows Instantaneous closing of all positions simultaneously when the top row USD unrealised P/L hits>+$X where X is a parameter I can set.

    Where can I get such a program script? I am willing to pay for it.
  2. et123


    you could create a Button in IB to close ALL positions.

    If you use eSignal then it can be programmed via EFS and IB plugin.
  3. IB has a menu option to close all positions but I want to automate it once the net P/L hits a certain value so I don't have to be at the computer.

    But how do you create customised buttons in IB?
  4. et123


    Configure-Buttons-New and then select the necessary parameters associated with the new button.

    I think you'd have to utilize IB API to fully automate what you want, either via DDE in Excel or Java.