San Sebastian/Spain
Posts: 12 since Sep 2011
Thanks Given: 0
Thanks Received: 1
|
Hell Im trying to programm this system but there is error somewhere. The idea is to go long when one down day and one down week in a row.
protected override void Initialize()
{
Add(PeriodType.Week,1);
CalculateOnBarClose = true;
}
/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{
if (BarsInProgress == 1)
{
return;
}
// Condition set 1
if (Close[1][0] > Close(BarsArray[1],[1]
&& Close[0] > Close[1])
{
EnterLong(DefaultQuantity, "");
}
}
Some help.....
|