// Sent email with a "SCAN" from Automatic analysis
// ---------- STRING For EMAIL
xr=RSI(89);
Buy=IIf(LastValue(xr<40),1,0);
Rtext=NumToStr ( LastValue( xr) , 1 ); // Rsi price to String
Ticker=Name();
LastTime=Now(5);
LastPrice=NumToStr(LastValue(C),0.4);
subjectGMAIL= Ticker+",C="+LastPrice+",rsi89="+Rtext+",Time"+LastTime;
msgGMAIL = "Time Frame : "+Interval(2) +" min";
procedure emailAlert(subject, msg)
{
text = subject + " " + msg;
AlertIf(True, "EXEC E:\\AmiBroker\\EMailerSSL.exe", text, 5, 0); // enter your amibroker Path here
}
function sentEmailOnce( text )
{
if( StaticVarGetText(Name()+"RSI") != text )
{
Say( text );
StaticVarSetText(Name()+"RSI", text );
emailAlert(subjectGMAIL,"MyMessage\nline2\nscan3");
}
}
if (Buy) sentEmailOnce("Testing rsi "+Name() );