which I have included in a jpg screenshot, on the following line below once I view the code. Can anyone help me out?
if (CrossAbove(T3(MyInput0, 3, 0.7), T3(MyInput1, 3, 0.7), 1)
------------------------------------------------------------------------------------------------
{
/// <summary>
/// Test Strategy
/// </summary>
[Description("Enter the description of your strategy here")]
public class MyCustomStrategy : Strategy
{
#region Variables
// Wizard generated variables
private int myInput0 = 50; // Default setting for MyInput0
private int myInput1 = 100; // Default setting for MyInput1
private int myInput2 = 20; // Default setting for MyInput2
// 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()
{
Add(T3(MyInput0, 3, 0.7));
Add(T3(MyInput1, 3, 0.7));
SetProfitTarget("buy", CalculationMode.Percent, 20);
SetStopLoss("buy", CalculationMode.Percent, 10, false);
CalculateOnBarClose = true;
}
/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{
// Condition set 1
if (CrossAbove(T3(MyInput0, 3, 0.7), T3(MyInput1, 3, 0.7), 1)
&& Close[0] < Bollinger(2, MyInput2).Lower[0])
{
EnterLong(DefaultQuantity, "buy");
}
// Condition set 2
if (T3(MyInput0, 3, 0.7)[0] <= T3(MyInput1, 3, 0.7)[0]
&& Close[0] == Bollinger(2, MyInput2).Lower[0])
{
ExitLong("sell", "buy");
}
}
#region Properties
[Description("")]
[GridCategory("Parameters")]
public int MyInput0
{
get { return myInput0; }
set { myInput0 = Math.Max(1, value); }
}
[Description("")]
[GridCategory("Parameters")]
public int MyInput1
{
get { return myInput1; }
set { myInput1 = Math.Max(1, value); }
}
[Description("")]
[GridCategory("Parameters")]
public int MyInput2
{
get { return myInput2; }
set { myInput2 = Math.Max(1, value); }
}
#endregion
}
}


Comment