{
/// <summary>
/// Enter the description of your strategy here
/// </summary>
[Description("Enter the description of your strategy here")]
public class DMICROSS : Strategy
{
#region Variables
// Wizard generated variables
private int aDEX = 1; // Default setting for ADEX
// User defined variables (add any user defined variables below)
#endregion
/// <summary>
/// This method is used to configure the strategy and is called once before any strategy method is called.
/// </summary>
protected override void Initialize()
{
SetProfitTarget(0);
CalculateOnBarClose = true;
}
/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{
// Condition set 1
if (DM(14).DiPlus[0] == DM(14).DiMinus[0]
&& ADX(14)[0] >= 15)
{
SendMail("[email protected]", "[email protected]", "DMI Cross", "DMI Cross");
}
}
#region Properties
[Description("")]
[Category("Parameters")]
public int DPLUS
{
get { return dPLUS; }
set { dPLUS = Math.Max(-304, value); }
}
[Description("")]
[Category("Parameters")]
public int DMINUS
{
get { return dMINUS; }
set { dMINUS = Math.Max(-324, value); }
}
[Description("")]
[Category("Parameters")]
public int ADEX
{
get { return aDEX; }
set { aDEX = Math.Max(-178, value); }
}
#endregion
}
}

Comment