Expert Advisors: MT5 DDE - Server - page 3

 
Younes Deldar:
Hello
I have a question

How to add the purchase price of a particular currency pair to Excel

This shows only the EMA 21

i need ask & bid currency

if(!CheckItem("BID","EURUSD")) AddItem("BID","EURUSD");
if(!CheckItem("ASK","EURUSD")) AddItem("ASK","EURUSD");
SetItem("BID","EURUSD",(double)SymbolInfoDouble(Symbol(),SYMBOL_BID));
SetItem("ASK","EURUSD",(double)SymbolInfoDouble(Symbol(),SYMBOL_ASK));
 
IlyshikBTC:
if(!CheckItem("BID","EURUSD")) AddItem("BID","EURUSD");
if(!CheckItem("ASK","EURUSD")) AddItem("ASK","EURUSD");
SetItem("BID","EURUSD",(double)SymbolInfoDouble(Symbol(),SYMBOL_BID));
SetItem("ASK","EURUSD",(double)SymbolInfoDouble(Symbol(),SYMBOL_ASK));

I tried using your code but it only get me the Ask/Bid of the first currency pair in the list of symbols in MT5 regardless of the currency symbol I add in the code.

For example, I have USDCAD as the first symbol in MT5 symbols list. I write the code you provided with EURUSD, but the Ask price I get is the USDCAD one not the EURUSD one. How to fix that?

Also, do you have any suggestions on how to connect ask price of all currency pairs/symbols to Excel?

Thanks!

IlyshikBTC
IlyshikBTC
  • 2021.03.04
  • www.mql5.com
Trader's profile
 
mzee_zaki:

I tried using your code but it only get me the Ask/Bid of the first currency pair in the list of symbols in MT5 regardless of the currency symbol I add in the code.

For example, I have USDCAD as the first symbol in MT5 symbols list. I write the code you provided with EURUSD, but the Ask price I get is the USDCAD one not the EURUSD one. How to fix that?

Also, do you have any suggestions on how to connect ask price of all currency pairs/symbols to Excel?

Thanks!

Try change: Symbol()  to   _Symbol


Please visit the brazilian comments 


https://www.mql5.com/pt/forum/33344

Especialistas: Servidor DDE
Especialistas: Servidor DDE
  • 2014.01.15
  • www.mql5.com
Artigos, comentários da Biblioteca: Especialistas: Servidor DDE
 

THOMASILVA :


Please visit the brazilian comments 


https://www.mql5.com/en/forum/33344

Forum on trading, automated trading systems and testing trading strategies

Expert Advisors: MT5 DDE - Server

Tom Sasson , 2020.06.28 09:52

Sorry for late replying, it was possible of course.

I said "was" because I haven't used this tool for 3 years now, and haven't tried on Windows 10 so you may experiment and report back.

@Tom Sasson


Hi THOMASILVA,

Following these steps ...


Start the DDE server.

Start mt5 and compile dde_example.mq5.

Open the graph of the desired asset in mt5 and drag the dde_example.ex5 (result of the compilation).

You will see the items on the server display.


... I still not able to show up any values ​​into the MT4DDE window even though the sample EA is running.

May you have any advice about MT5 or Windows config or other aspects that could affect the process?

(ie for MT4 DDE it's required to allow DDE server but this checkbox is not in MT5)

Thanks in advance!

Porque a Hospedagem Virtual no MetaTrader 4 e no MetaTrader 5 são Melhores que os VPS Usuais
Porque a Hospedagem Virtual no MetaTrader 4 e no MetaTrader 5 são Melhores que os VPS Usuais
  • www.mql5.com
A rede de hospedagem virtual em nuvem foi desenvolvida especialmente para o MetaTrader 4 e o MetaTrader 5, possuindo todas as vantagens de uma solução nativa. Obtenha os benefícios de nossa oferta gratuita por 24 horas - teste um servidor virtual agora mesmo.
 
Hi,how can I transfer data from MT4 to excel?
 
THE PRICES ARE REFRESHED IN SECONDS. HOW TO MAKE PRICES UPDATE IN MILLISECONDS?
 
cant we 

Input Variables

to change symbol

 
Tom Sasson #:

This post is quite old, but still relevant.

This tool is amazing, and can be used to integrate data even from multiple instances of MT4 or multiple EAs.

If any of the previous questions is still relevant, please re-post them and I will answer.

The same goes for MQL4 questions, since I can help with MQL4 also.

Hello.


I hope that I can still get an answer from you. I am able to get the default data from the DDE server (Company name, time and EMA) into excel. However, after getting the DDE to display ticks/quotes for various instruments on its own interface, I can not display the quotes in excel. Can you please help me with the formula to display the quotes in Excel?


Thank you.

 
IlyshikBTC #:
if(!CheckItem("BID","EURUSD")) AddItem("BID","EURUSD");
if(!CheckItem("ASK","EURUSD")) AddItem("ASK","EURUSD");
SetItem("BID","EURUSD",(double)SymbolInfoDouble(Symbol(),SYMBOL_BID));
SetItem("ASK","EURUSD",(double)SymbolInfoDouble(Symbol(),SYMBOL_ASK));

Greetings. 

The code worked for me, and now the DDE displays the bid and ask price quotes. My problem now is that I cannot display the quotes in Excel. The default data that comes with the DDE,  that I am able to display in excel, but not the price quotes. 

Could you please help me with the formula to display the quotes in Excel?

Thank you.

 
Conrade Nyandoro #:

Greetings. 

The code worked for me, and now the DDE displays the bid and ask price quotes. My problem now is that I cannot display the quotes in Excel. The default data that comes with the DDE,  that I am able to display in excel, but not the price quotes. 

Could you please help me with the formula to display the quotes in Excel?

Thank you.

=MT4DDE|BID!EURUSD - with dot in excel cell
=MT4DDE|ASK!EURUSD

=ЗАМЕНИТЬ(MT4DDE|BID!EURUSD;2;1;",")
=ЗАМЕНИТЬ(MT4DDE|ASK!EURUSD;2;1;",")

=REPLACE(MT4DDE|BID!EURUSD;2;1;",") - with comma in excel cell
=REPLACE(MT4DDE|ASK!EURUSD;2;1;",")