0

I have custom data sources, but I do not know how to fill the market data into the MT4 server.

So how do I insert new market data to MetaTrader 4 server?

I got the DataReed API (read function) in the document, but in my mind it's used for MT4 to read market data from us.

Is it "MetaTrader 4" -> "API" -> "Server API" -> "Price Data" -> "HistoryAddTick"?

But this is history data - I want real-time data.

dxhame
  • 3
  • 1
  • @toonice I Approved your edit. Mind if I give a few tips for edting? `code markdown` should only be used for code, not for the names of tools. Also, things like "thanks in advance" [should be removed from posts](https://meta.stackexchange.com/q/2950/168333). (BTW we only remove "thanks" and such when we're already editing. If removing "thanks" is the only thing needed, it's not worth filling up the edit queue). – S.L. Barth is on codidact.com May 07 '17 at 05:02
  • 1
    S.L. Barth, Thank you for the Approval and the suggestions. In regards your message, are there any pages that describe the protocols or outright rules to be followed in regards formatting as a Code Segment, or at least much debated opinion pieces such as at your linked page? Also, as per that page, *many* people find a brief courtesy such as "Thanks in advance" to be acceptably trivial or even welcome. I am one such. As long as they don't go on about it (especially at the beginning) I shall continue to welcome such courtesies as unwasted time. :) – toonice May 07 '17 at 05:18
  • @toonice You're welcome! I also think "Thanks" and such should be fine. But the community decided it's noise. Regarding the rules for editing, I once [proposed a FAQ](https://meta.stackoverflow.com/q/303219/812149) so we could have all the rules in one place. It's not official, but several people have contributed to it. – S.L. Barth is on codidact.com May 07 '17 at 10:50

1 Answers1

0

I was using two different approaches for similar task:

  1. You can simulate MQ Data Feeder, for this you will need to understand protocol which is used. It's not complicated, but there is no documentation.

  2. You can use manager API to send ticks to server, method name: SymbolSendTick. Manager API provided as c++ dll with headers. But since you marked your question with C# tag, I assume that you want to do it via .NET. So you might want to use managed wrapper. It will look like:

    using (var metatrader = new ClrWrapper(new ConnectionParameters
        {
            Login = 123456,
            Password = "managerPassword",
            Server = "123.123.123.123:443"
        }))
    {
        metatrader.SymbolSendTick("#SYMBOL", 1.5, 2.3);
    }
    
Uriil
  • 11,948
  • 11
  • 47
  • 68
  • 1. You can simulate MQ Data Feeder, for this you will need to understand protocol which is used. It's not complicated, but there is no documentation. ----------- DateFeeder is it use UniFeeder ? – dxhame May 08 '17 at 03:51
  • @dxhame Yes, I am talking about UniFeeder – Uriil May 08 '17 at 07:01