WinSock or DDE (Get Quotes & Order State)

 

Hi,

I'm a bit of a newbie here, but I've searched the fourm and still dont have an answer.

I'd like to write an external program in Visual Studio (Win 32 console application) that can get Market Quote changes in real time.

I can see two options:

1. Open up a WinSock socket from my console application to the EA and send MarketInfo() messages periodically. The EA will receive these messages and forward them to the broker and return with a reply (in essence, simulating a Client API)

2. Use a standard DDE.dll to stream information from the watchlist in the MT4 application.

What would be the correct way to do this?

The second stage of my programming would be to findout if my Pending Order was Completed (left pending state)

If you have any code samples it would be really helpful as well

Thanks,

Reason: