How to print out a message with a MetaTrader script???

 

Here is the script that won't print anything??

Does anyone know why? -- I am running the script on a Daily EURUSD chart and I verified my stochastic line is above 0.30.

int start()
{

double stochmain;

stochmain=iStochastic("EURUSD",PERIOD_D1,12,3,3,MODE_SMA,0,MODE_MAIN,0);

if (stochmain > 0.30) {
Print (stochmain);
}
return(0);
}

Thanks in advance.

'youngster'

 

Try this:

Print (DoubleToStr(stochmain,Digits));
 
ggekko wrote >>

Try this:

Thanks for the info. I tried your solution, but still nothing is showing up. Can't see any results in any logs either??

 
youngster:

Thanks for the info. I tried your solution, but still nothing is showing up. Can't see any results in any logs either??

Try this:

int start()
{

double stochmain;
stochmain=iStochastic("EURUSD",PERIOD_D1,12,3,3,MODE_SMA,0,MODE_MAIN,0);

if(stochmain > 30.0) Print(DoubleToStr(stochmain,Digits)); // 30.0 instead of 0.30

return(0);
}

Reason: