Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.
Zygmunt joined the community
Is it possible to use AND and OR for optimization in Amibroker? Lets look at this line of code: U = Optimize(1, 0, 1, 1); Buy = (C > MA(C,20) ) == U; //condition is True if U = 1 and False if U = 0 In effect I can flip ">" operator to "<=" by using numerical values of 0 for False and 1 for True in optimization. Is there a way to do the same with AND and OR? Lets look at this line of code: Buy = ROC(C,5) > 1 OR ROC(C,1) < -2; and this one: Buy = ROC(C,5) > 1 AND ROC(C,1) < -2; Is there a way to run an optimization on the following so it is an equivalent to switching between AND and OR: OPERATOR = Optimize(AND, AND, OR, ?); Buy = ROC(C,5) > 1 OPERATOR ROC(C,1) < -2; Any help would be greatly appreciated.