Connecting Trade Execution to external software

Questions about MultiCharts and user contributed studies.
DanielFXS
Posts: 29
Joined: 08 Oct 2019
Has thanked: 10 times
Been thanked: 4 times

Connecting Trade Execution to external software

Postby DanielFXS » 05 Feb 2024

Hi all,
I'm currently developing a solution to help me copy my trades out of multicharts into other software programs. I've found some pretty useful tools using pre-made .dll files. And I can send messages out of multicharts and receive them. There are 2 like to haves I'd like to have and wondering if this functionality is possible.
  1. Get access to when trades are executed by the trading engine. Right now I'm using FilledOrderAction which is pretty good. But this has to wait for my executed order to be filled before it can be utilized. This isn't too big of a deal as I'm happy with the performance as I'm only losing approx 200ms for my order sent to be filled.
  2. Get access to all trades that are in flight or executed and not be dependent on the chart I run the script on. As I would like to copy all trades from my account I would prefer to run my script on one chart and not have to apply it to every symbol and every strategy. Is there a way to catch every broker event being executed?
    I've looked into using GetNumPositions, GetPositionSymbol and GetPositionQuantity but there seems to be a delay using these as they don't seem to update on broker events.
Be good to get some ideas. I'm open to trying more complicated things. Just need some direction on where to look.
Thanks
Daniel

Return to “MultiCharts”