PDA

View Full Version : Email Alert


m3power222
06-22-2009, 01:26 PM
Got it to send me a email when a certain condition happens but have issues.

Just email so nothing will show up on the chart, how do you force Panel to 1? Default is 2 and puts a empty indicator below the chart.

When I hardcode to and from addresses it will send but when I use a private strings it will not work...

Here is how I have it coded:

#region Variables
private string emailfrom = "you@you.com";
private string emailto = "you@you.com";

if (condition)
}
SendMail("emailfrom", "emailto", "Long Trigger", "Long Trigger");
{

#region Properties
[Description("")]
[Category("Parameters")]
public string EmailFrom
{
get { return emailfrom; }
set { emailfrom = value; }
}

[Description("")]
[Category("Parameters")]
public string EmailTo
{
get { return emailto; }
set { emailto = value; }
}

Thanks in advance.

NinjaTrader_Josh
06-22-2009, 01:30 PM
In Initialize, Overlay = true.

You should not be using "" when you call a variable. The variable is already a string. You do not need quotes to make it another string.

m3power222
06-22-2009, 02:10 PM
In Initialize, Overlay = true.

You should not be using "" when you call a variable. The variable is already a string. You do not need quotes to make it another string.

Perfect, thanks again.