Hello All,
Over the last few years I've developed some simple VBA code to route and manage trades to Sterling using the API, most of it is done in VBA and some of it is done in C#.
One of the functions that I would like to implement via the API in my VBA code base is the "Close 25% (or 50%,75%,100%) of open longs/shorts at MKT". This is an "clickable" option in the Position Summary window.
Does anyone know how to do this effectively? Do I have to write code that pulls all the positions, does all the pertinent calculations, and then sends out orders? This seems like reinventing the wheel since Sterling has those functions built in.
Has anyone written code like this before, or, where you able to utlize those built in functions? If the code exists somewhere, can someone point me to the source?
Thanks in advance for any advice.
Mike
Over the last few years I've developed some simple VBA code to route and manage trades to Sterling using the API, most of it is done in VBA and some of it is done in C#.
One of the functions that I would like to implement via the API in my VBA code base is the "Close 25% (or 50%,75%,100%) of open longs/shorts at MKT". This is an "clickable" option in the Position Summary window.
Does anyone know how to do this effectively? Do I have to write code that pulls all the positions, does all the pertinent calculations, and then sends out orders? This seems like reinventing the wheel since Sterling has those functions built in.
Has anyone written code like this before, or, where you able to utlize those built in functions? If the code exists somewhere, can someone point me to the source?
Thanks in advance for any advice.
Mike