I would like to conditionally load and execute an Include
file only on days when certain conditions are True. I do this with ParamToggle
all the time since ParamToggle creates a numeric or Boolean condition. Now I
want to do it only on days when I have a Buy or Sell condition which is in an
array and Amibroker complains that array is not allowed in an if() statement.
IIf is not acceptable since it is just an assignment statement. I don’t
want to build a loop since the include file uses arrays.
Here’s the code. Any ideas?
if (newBuy OR newSell)
#include <W_Xfactor.afl>
else
tradeLevel = trange = 1;
Error 6. Condition in IF, WHITEL, FOR statements ahs to be
Numeric or Boolean type. You can not use array here, please use [] (array
subscript operator) to access array elements.
--
Terry