Add data series for second instrument:
Add("M6J", PeriodType.Day, 1);
I want to enter and close a trade everytime this happens in each instrument. I´ve tried this way:
if (BarsInProgress == 0)
{
// Condition set 1
if (ATR(12)[0] > ATR(48)[0])
{
EnterLong(DefaultQuantity, "");
}
// Condition set 2
if (ATR(12)[0] < ATR(48)[0])
{
ExitLong("", "");
}
}
if (BarsInProgress == 1)
{
// Condition set 1
if (ATR(BarsArray[1],12)[0] > ATR(BarsArray[1],48)[0])
{
EnterLong(DefaultQuantity, "");
}
// Condition set 2
if (ATR(BarsArray[1],12)[0] < ATR(BarsArray[1],48)[0])
{
ExitLong("", "");
}
}
But after backtesting in srategy analizer, only trades the primary intrument. There´s no trades for second, third, etc... instruments.
How do you tell NT to trade the second instrument (or the third, fourth, etc... any other)? I mean, EnterLong("TRADE M6J""")
Did I do something wrong? I guess I did.
Thank you!!

Comment