protected override void Initialize() { Add("DX 06-12", PeriodType.Minute, 1); CalculateOnBarClose = true; } /// <summary> /// Called on each bar update event (incoming tick) /// </summary> protected override void OnBarUpdate() { // Condition set 1 if (Close([1][0] > EMADN(21)[1][0])) { EnterLong(DefaultQuantity, ""); }
[CODE protected override void Initialize()
{
Add("DX 06-12", PeriodType.Minute, 1);
CalculateOnBarClose = true;
}
/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{
// Condition set 1
if (Close(BarsArray[1][0] > EMADN(BarsArray[1],21)[0]))
{
EnterLong(DefaultQuantity, "");
}
// Condition set 2
if (Close[0] < EMADN(21)[0])
{
EnterShort(DefaultQuantity, "");
}
}][/CODE]
I'm sure this is a simple formatting problem but I can't seem to figure it out.
Thanks for your help.
DavN
Comment