Expert Advisors: MT5 DDE - Server - page 4 12345678 New comment bucket 2019.01.11 03:43 #31 Would it be possible to get the source code for the DLL and EXE? I am writing my first DLLs for MT5 (32bit and 64bit) and this would be a perfect project. Mikhail Shikin 2019.02.26 09:26 #32 I'm not working I get the error "2019.02.26 11:23:40.882 dde_example (ES,H1) Alert: Cannot find MT4.DDE.2 window!" rakeshp37 2019.10.06 22:25 #33 Program Running fine.. But i don't understand where i need to create excelsheet.. or its generate auto? if its auto generate so where i can find it?Please help Thanks, MARFE 2019.12.13 02:25 #34 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. Hi Tom , I would like to export in real time buy and sell tick data to excell, is that possible using this tool? Thanks Jozeph Brasil 2020.04.13 20:24 #35 Buenas. I'm trying to get LAST, but it always comes up blank. Does anyone have any idea what's wrong? CopyBuffer(MA_handle,0,0,100,MA); ArraySetAsSeries(MA,true); double LAST = SymbolInfoDouble("USDBRL", SYMBOL_LAST); // Check & Add Item DDE if(!CheckItem("A","B")) { if(!AddItem("A","B")) return; } if(!CheckItem("C","D")) { if(!AddItem("C","D")) return; } if(!CheckItem("COMPANY","Value")) AddItem("COMPANY","Value"); if(!CheckItem("TIME","Value")) AddItem("TIME","Value"); if(!CheckItem("LAST","EURUSD")) AddItem("LAST","USDBRL"); // Set Item Value DDE SetItem("COMPANY","Value",(string)AccountInfoString(ACCOUNT_COMPANY)); SetItem("TIME","Value",(string)TimeCurrent()); SetItem("A","B","EMA(21):"+DoubleToString(MA[0],6)); SetItem("C","D","LAST:"+DoubleToString(LAST,5)); } Copied buffer returns 0.0. Metatrader 5 - TimeCurrent() iCustom adressing maurorechi 2020.05.04 06:20 #36 Good evening. After a lot of fiddling, I managed to solve it. I registered on the site just for this. Change the entire OnTimer() function: void OnTimer() { //--- filling an array MA[] with current values of iMA //--- Copying 100 elements // CopyBuffer(MA_handle,0,0,100,MA); // ArraySetAsSeries(MA,true); double EURUSD_ASK = SymbolInfoDouble("EURUSD",SYMBOL_ASK); // for eurusd (example) double EURUSD_BID = SymbolInfoDouble("EURUSD",SYMBOL_BID); double USDCHF_ASK = SymbolInfoDouble("USDCHF",SYMBOL_ASK); double USDCHF_BID = SymbolInfoDouble("USDCHF",SYMBOL_BID); // Check & Add Item DDE // if(!CheckItem("EMA","B")) // { // if(!AddItem("EMA","B")) return; // } if(!CheckItem("COMPANY","Value")) AddItem("COMPANY","Value"); if(!CheckItem("TIME","Value")) AddItem("TIME","Value"); if(!CheckItem("EURUSD","ASK")) AddItem("EURUSD","ASK"); if(!CheckItem("EURUSD","BID")) AddItem("EURUSD","BID"); if(!CheckItem("USDCHF","ASK")) AddItem("USDCHF","ASK"); if(!CheckItem("USDCHF","BID")) AddItem("USDCHF","BID"); // Set Item Value DDE SetItem("COMPANY","Value",(string)AccountInfoString(ACCOUNT_COMPANY)); SetItem("TIME","Value",(string)TimeCurrent()); // SetItem("EMA","B","EMA(21):"+DoubleToString(MA[0],6)); SetItem("EURUSD","ASK",DoubleToString(EURUSD_ASK,5)); SetItem("EURUSD","BID",DoubleToString(EURUSD_BID,5)); SetItem("USDCHF","ASK",DoubleToString(USDCHF_ASK,5)); SetItem("USDCHF","BID",DoubleToString(USDCHF_BID,5)); } The rest is the same as described above. I hope it helps someone. trading with wrong open Errors, bugs, questions Wishes for MT5 SURANIKI 2020.05.10 19:17 #37 Mikhail Shikin: I'm not working I get the error "2019.02.26 11:23:40.882 dde_example (ES,H1) Alert: Cannot find MT4.DDE.2 window!" You forgot to run DDE Server.exe Tom Sasson 2020.06.28 09:52 #38 MARFE: Hi Tom , I would like to export in real time buy and sell tick data to excell, is that possible using this tool? Thanks 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. Scripts: ThirdPartyTicks Should i worry ? Machine learning in trading: douglas14 2020.07.23 19:20 #39 maurorechi:Good evening. After a lot of fiddling, I managed to solve it. I registered on the site just for that. Change the entire OnTimer() function: void OnTimer() { //--- filling an array MA[] with current values of iMA //--- Copying 100 elements // CopyBuffer(MA_handle,0,0,100,MA); // ArraySetAsSeries(MA,true); double EURUSD_ASK = SymbolInfoDouble("EURUSD",SYMBOL_ASK); // for eurusd (example) double EURUSD_BID = SymbolInfoDouble("EURUSD",SYMBOL_BID); double USDCHF_ASK = SymbolInfoDouble("USDCHF",SYMBOL_ASK); double USDCHF_BID = SymbolInfoDouble("USDCHF",SYMBOL_BID); // Check & Add Item DDE // if(!CheckItem("EMA","B")) // { // if(!AddItem("EMA","B")) return; // } if(!CheckItem("COMPANY","Value")) AddItem("COMPANY","Value"); if(!CheckItem("TIME","Value")) AddItem("TIME","Value"); if(!CheckItem("EURUSD","ASK")) AddItem("EURUSD","ASK"); if(!CheckItem("EURUSD","BID")) AddItem("EURUSD","BID"); if(!CheckItem("USDCHF","ASK")) AddItem("USDCHF","ASK"); if(!CheckItem("USDCHF","BID")) AddItem("USDCHF","BID"); // Set Item Value DDE SetItem("COMPANY","Value",(string)AccountInfoString(ACCOUNT_COMPANY)); SetItem("TIME","Value",(string)TimeCurrent()); // SetItem("EMA","B","EMA(21):"+DoubleToString(MA[0],6)); SetItem("EURUSD","ASK",DoubleToString(EURUSD_ASK,5)); SetItem("EURUSD","BID",DoubleToString(EURUSD_BID,5)); SetItem("USDCHF","ASK",DoubleToString(USDCHF_ASK,5)); SetItem("USDCHF","BID",DoubleToString(USDCHF_BID,5)); } The rest is the same as described above. I hope it helps someone. Thanks Maurorechi, but do you have to do these lines that you did for EURUSD for each asset? And another question, do you have to have the asset's window open in order to pull information from an asset? Lourenco Jakobson 2020.07.25 00:06 #40 I would like it to be able to generate the bid/ask values automatically for all the symbols in the market watch. Can anyone help? 12345678 New comment
Would it be possible to get the source code for the DLL and EXE? I am writing my first DLLs for MT5 (32bit and 64bit) and this would be a perfect project.
Please help
Thanks,
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.
Hi Tom ,
I would like to export in real time buy and sell tick data to excell, is that possible using this tool?
Thanks
Buenas.
I'm trying to get LAST, but it always comes up blank.
Does anyone have any idea what's wrong?
CopyBuffer(MA_handle,0,0,100,MA);
ArraySetAsSeries(MA,true);
double LAST = SymbolInfoDouble("USDBRL", SYMBOL_LAST);
// Check & Add Item DDE
if(!CheckItem("A","B"))
{
if(!AddItem("A","B")) return;
}
if(!CheckItem("C","D"))
{
if(!AddItem("C","D")) return;
}
if(!CheckItem("COMPANY","Value")) AddItem("COMPANY","Value");
if(!CheckItem("TIME","Value")) AddItem("TIME","Value");
if(!CheckItem("LAST","EURUSD")) AddItem("LAST","USDBRL");
// Set Item Value DDE
SetItem("COMPANY","Value",(string)AccountInfoString(ACCOUNT_COMPANY));
SetItem("TIME","Value",(string)TimeCurrent());
SetItem("A","B","EMA(21):"+DoubleToString(MA[0],6));
SetItem("C","D","LAST:"+DoubleToString(LAST,5));
}
Good evening.
After a lot of fiddling, I managed to solve it. I registered on the site just for this.
Change the entire OnTimer() function:
void OnTimer()
{
//--- filling an array MA[] with current values of iMA
//--- Copying 100 elements
// CopyBuffer(MA_handle,0,0,100,MA);
// ArraySetAsSeries(MA,true);
double EURUSD_ASK = SymbolInfoDouble("EURUSD",SYMBOL_ASK); // for eurusd (example)
double EURUSD_BID = SymbolInfoDouble("EURUSD",SYMBOL_BID);
double USDCHF_ASK = SymbolInfoDouble("USDCHF",SYMBOL_ASK);
double USDCHF_BID = SymbolInfoDouble("USDCHF",SYMBOL_BID);
// Check & Add Item DDE
// if(!CheckItem("EMA","B"))
// {
// if(!AddItem("EMA","B")) return;
// }
if(!CheckItem("COMPANY","Value")) AddItem("COMPANY","Value");
if(!CheckItem("TIME","Value")) AddItem("TIME","Value");
if(!CheckItem("EURUSD","ASK")) AddItem("EURUSD","ASK");
if(!CheckItem("EURUSD","BID")) AddItem("EURUSD","BID");
if(!CheckItem("USDCHF","ASK")) AddItem("USDCHF","ASK");
if(!CheckItem("USDCHF","BID")) AddItem("USDCHF","BID");
// Set Item Value DDE
SetItem("COMPANY","Value",(string)AccountInfoString(ACCOUNT_COMPANY));
SetItem("TIME","Value",(string)TimeCurrent());
// SetItem("EMA","B","EMA(21):"+DoubleToString(MA[0],6));
SetItem("EURUSD","ASK",DoubleToString(EURUSD_ASK,5));
SetItem("EURUSD","BID",DoubleToString(EURUSD_BID,5));
SetItem("USDCHF","ASK",DoubleToString(USDCHF_ASK,5));
SetItem("USDCHF","BID",DoubleToString(USDCHF_BID,5));
}
The rest is the same as described above.
I hope it helps someone.
I'm not working I get the error "2019.02.26 11:23:40.882 dde_example (ES,H1) Alert: Cannot find MT4.DDE.2 window!"
You forgot to run DDE Server.exe
Hi Tom ,
I would like to export in real time buy and sell tick data to excell, is that possible using this tool?
Thanks
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.
Good evening.
After a lot of fiddling, I managed to solve it. I registered on the site just for that.
Change the entire OnTimer() function:
void OnTimer()
{
//--- filling an array MA[] with current values of iMA
//--- Copying 100 elements
// CopyBuffer(MA_handle,0,0,100,MA);
// ArraySetAsSeries(MA,true);
double EURUSD_ASK = SymbolInfoDouble("EURUSD",SYMBOL_ASK); // for eurusd (example)
double EURUSD_BID = SymbolInfoDouble("EURUSD",SYMBOL_BID);
double USDCHF_ASK = SymbolInfoDouble("USDCHF",SYMBOL_ASK);
double USDCHF_BID = SymbolInfoDouble("USDCHF",SYMBOL_BID);
// Check & Add Item DDE
// if(!CheckItem("EMA","B"))
// {
// if(!AddItem("EMA","B")) return;
// }
if(!CheckItem("COMPANY","Value")) AddItem("COMPANY","Value");
if(!CheckItem("TIME","Value")) AddItem("TIME","Value");
if(!CheckItem("EURUSD","ASK")) AddItem("EURUSD","ASK");
if(!CheckItem("EURUSD","BID")) AddItem("EURUSD","BID");
if(!CheckItem("USDCHF","ASK")) AddItem("USDCHF","ASK");
if(!CheckItem("USDCHF","BID")) AddItem("USDCHF","BID");
// Set Item Value DDE
SetItem("COMPANY","Value",(string)AccountInfoString(ACCOUNT_COMPANY));
SetItem("TIME","Value",(string)TimeCurrent());
// SetItem("EMA","B","EMA(21):"+DoubleToString(MA[0],6));
SetItem("EURUSD","ASK",DoubleToString(EURUSD_ASK,5));
SetItem("EURUSD","BID",DoubleToString(EURUSD_BID,5));
SetItem("USDCHF","ASK",DoubleToString(USDCHF_ASK,5));
SetItem("USDCHF","BID",DoubleToString(USDCHF_BID,5));
}
The rest is the same as described above.
I hope it helps someone.
Thanks Maurorechi,
but do you have to do these lines that you did for EURUSD for each asset?
And another question, do you have to have the asset's window open in order to pull information from an asset?