Would anyone know the C# code for the note in parenthesis that follows each enter long and enter short. Can not figure it out. Thanx Much.......
/// <summary>
/// This method is used to configure the strategy and is called once before any strategy method is called.
/// </summary>
public override void Initialize()
{
InitInstrument("GBPUSD"); Type.Minute1440;
InitInstrument("GBPJPY"); Type.Minute720;
InitInstrument("USDJPY"); Type.Minute720;
CalculateOnBarClose = false;
}
protected override void OnInstrumentUpdate(string instrument)
{
// trading strategy
if (High[0] > High[1])
{
EnterLong(); This note in the parenthesis that follows must be coded.(Enter a long position if not long already,and if a short position is open,than (exit) the short position first than Enter the long position at the same price).
}
// trading strategy
if (Low[0] < Low[1])
{
EnterShort(); This note in the parenthesis that follows must be coded.(Enter a short position if not short already,and if a long position is open,than sell(exit) the long position first than Enter the short position at the same price).
}
}
#region Properties
#endregion
}
}
/// <summary>
/// This method is used to configure the strategy and is called once before any strategy method is called.
/// </summary>
public override void Initialize()
{
InitInstrument("GBPUSD"); Type.Minute1440;
InitInstrument("GBPJPY"); Type.Minute720;
InitInstrument("USDJPY"); Type.Minute720;
CalculateOnBarClose = false;
}
protected override void OnInstrumentUpdate(string instrument)
{
// trading strategy
if (High[0] > High[1])
{
EnterLong(); This note in the parenthesis that follows must be coded.(Enter a long position if not long already,and if a short position is open,than (exit) the short position first than Enter the long position at the same price).
}
// trading strategy
if (Low[0] < Low[1])
{
EnterShort(); This note in the parenthesis that follows must be coded.(Enter a short position if not short already,and if a long position is open,than sell(exit) the long position first than Enter the short position at the same price).
}
}
#region Properties
#endregion
}
}
