Also can someone please have a look at this strategy and tell me why it wont work, it is my first time at arranging a strategy.
#region Variables
// Wizard generated variables
privateint mA10 = 10; // Default setting for MA10
// 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>
protectedoverridevoid Initialize()
{
CalculateOnBarClose = true;
}
///<summary>
/// Called on each bar update event (incoming tick)
///</summary>
protectedoverridevoid OnBarUpdate()
{
// Condition set 1
if (Close[0] > EMA(10)[0]
&& CrossAbove(Stochastics(10, 3, 2).K, Stochastics(10, 3, 2).D, 1)
&& CrossAbove(MACD(12, 26, 3), MACD(12, 26, 3).Avg, 1))
{
DrawArrowUp("My up arrow" + CurrentBar, false, 0, 0, Color.Lime);
EnterLong(DefaultQuantity, "");
}
// Condition set 2
if (Close[0] < EMA(10)[0]
&& CrossBelow(Stochastics(10, 3, 2).K, Stochastics(10, 3, 2).D, 1)
&& CrossBelow(MACD(12, 26, 3), MACD(12, 26, 3).Avg, 1))
{
DrawArrowDown("My down arrow" + CurrentBar, false, 0, 0, Color.Red);
EnterShort(DefaultQuantity, "");
}
}

Comment