Malchow (Meckl.)
Experience: Intermediate
Platform: NinjaTrader, TWS
Trading: Stocks
Posts: 17 since Mar 2011
Thanks Given: 15
Thanks Received: 0
|
I canīt receive emails.
I insert:
#region Variables
private DateTime lastEmailSent;
#endregion
and:
protected override void OnBarUpdate()
{
// Condition set 1
if (ToTime(Time[0]) >= 100000 && ToTime(Time[0]) <= 220000
&& WMA(Weighted, 20)[0] > WMA(Weighted, 50)[0]
&& Low[0] > WMA(Weighted, 20)[0]
&& WMA(Weighted, 20)[0] > WMA(Weighted, 20)[4]
&& Close[0] > Swing(5).SwingHigh[0])
{
if (DateTime.Now > lastEmailSent.AddMinutes(30))
{
SendMail("[email protected]", "[email protected]", "Buy LONG position", "Entry @ "+ Close[0] + ".");
lastEmailSent = DateTime.Now;
}
EnterLong(DefaultQuantity, "Long");
}
But I delete the code under "Properties":
#region Properties
[Description("")]
[GridCategory("Parameters")]
public int MyInput0
{
get { return myInput0; }
set { myInput0 = Math.Max(1, value); }
}
#endregion
Where is the error?
Thanks für your help.
Blackburn
|