And it tells me that I should have 4 or 5 bars, I don't quite understand how to do it.
The error is given when I put in the strategy day1, month1, year1. (these are "int")
protected override void OnBarUpdate()
{
if (State == State.Historical)
return;
day1=Time[0].Day;
month1=Time[0].Month ;
year1=Time[0].Year ;
}
protected override void OnMarketData(MarketDataEventArgs marketDataUpdate)
{
if (marketDataUpdate.MarketDataType != MarketDataType.Last || marketDataUpdate.Volume < BlockSize)
return;
var date1 = new DateTime(year1, month1, day1, 2, 0, 0);
var date2 = new DateTime(year1, month1, day1, 3, 5, 25);
if ( marketDataUpdate.Time> date1) && ( marketDataUpdate.Time< date2)
Print("");
}
Regards.
Comment