Last CandleSticks - page 2

 
WasimFar:

Thanks Jaman,

you helped much. i am able to run the client. using NDde.dll.

but i still dont know how to get the candles.

can you please put some code how to retrive ? i dont have any classes under NDde.dll that deals with CandleSticks.

Sorry, you are right... The documentation in MetaTrader states:

Attention: History Data cannot be exported through DDE protocol. The current quotes are exported only when the client terminal is online.

You'd have to constantly capture tick data and create your candles based on the timestamp... My guess is that you don't want to do that as you probably want the last candle, even when you just start up your program.


You'll probably need to write the c++ wrapper which gives you the ability to call the iTimeSeries functions from C#. Either that, or look into the openforexplatform to provide access to metatrader from your C# code if you don't want to do the wrapping yourself. 'New .NET based Meta Trader 4 Integrated Platform'.

Reason: