
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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 );
}