Is it possible for MT4 scripts to import (retrieve) data from another application? For example, in eSignal EFS, a DDEOutput object is created and periodically set its value. Is it possible for a MQ4 script to access that value? If so, I don't need to use file to exchange information between MT4 and eSignal EFS.
var study = null;
var dde = new DDEOutput( "movavg" + getSymbol() );
var bInit = false;
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
var study = null;
var dde = new DDEOutput( "movavg" + getSymbol() );
var bInit = false;
function preMain() {
setPriceStudy(true);
}
function main() {
var retVal;
if ( bInit==false ) {
//create an EMA study
study = ema( 10 );
bInit=true;
}
//gather the current value from the study
retVal = study.getValue(0);
//if it is not null, assign it to our DDE object
if ( retVal != null) dde.set( retVal );
return( retVal );
}