how can I place order on 3 different products at the same time?
protected override void Initialize()
{
CalculateOnBarClose = true;
Add("xxx", PeriodType.Second,y, MarketDataType.Last);
Add("xxxxxxx", PeriodType.Second,y, MarketDataType.Last);
Add("xxxxxxx", PeriodType.Second,y, MarketDataType.Last);
}
/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{
// if (CurrentBar < 1 ) return;
if (CrossAbove(xx(100,0),0.001,2))
{
if (BarsInProgress == 1)
EnterLong(1,"x Trade");
if (BarsInProgress == 2 )
EnterLong(1,"x Trade");
if ( BarsInProgress == 3 )
EnterShort(1,"xTrade");
}
But only 2 out of three products get orders, and they change. Sometimes 1 and 2, sometimes 1 and 3 ...
What can be the problem here?
thanks
Mike
Comment