I want to add a second instrument and set a variable when Close goes above SMA(14) for the second instrument and use the variable to trigger other signals.
I have:
Add("IBM", PeriodType.Day, 1);
and then
if (Closes[1][0] > SMA(14)[0])
variable = 1;
I tried using the BarsInProgress method but I keep getting errors about type and SMA.
Please help...

Comment