Could you please help me with the following problem - I need to record tick data of two instruments for post-procesing. I`m using the following code:
protected override void Initialize()
{
Add("$EURUSD", PeriodType.Minute, 1);
}
protected override void OnBarUpdate()
{
if (BarsInProgress == 0)
{
Close1 = Close[0];
}
if (BarsInProgress == 1)
{
Close2 = Close[0];
}
string cl12= Time[0] + ";" + Close1 + ";" + Close2 + Environment.NewLine;
File.AppendAllText(path, cl12);
}

Comment