[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [amibroker] Conditional include



PureBytes Links

Trading Reference Links

according to that discussion: it CAN be done??  Hmmm...
 
d


From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of Terry
Sent: Tuesday, September 06, 2005 10:48 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Conditional include

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

 



Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html





YAHOO! GROUPS LINKS