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

[amibroker] Using booleans to weed out useless criteria


  • Date: Sat, 02 Jan 2010 13:24:33 -0000
  • From: "bacu_robert" <bacu_robert@xxxxxxxxx>
  • Subject: [amibroker] Using booleans to weed out useless criteria

PureBytes Links

Trading Reference Links

Hello group:

To analyze whether I have the best conditions for determining a buy, I would like to use booleans to weed out the useless crtieria, but I cannot figure out how to write it.  For the pseudo code I wrote below, I don't know if I want to be more than or less than a optimized value of CCI(period).  I know that I can manually run several tests to discover the right symbol, but I would rather take the lazy way and let the computer do the work for me, especiall when I add several criteria.

It seems so simple, but what I have written does not work.  Can someone looke this over and tell me what I am doing wrong?


period = 12;
int_cc_b = Optimize("CCI bool b",  0,   0,   1,  1 );
cc       = Optimize("CCI",        -0,-150, 150, 20 );
int_cc_a = Optimize("CCI bool a",  0,   0,   1,  1 );

bool_cc_a= False;
bool_cc_b= False;

if (int_cc_a == 0) bool_cc_a = False; else bool_cc_a = True;
if (int_cc_b == 0) bool_cc_b = False; else bool_cc_b = True;

Buy = MACD() > Signal()
 AND (bool_cc_b AND CCI(period) < cc)
 AND (bool_cc_a AND CCI(period) > cc)
;

Sell  = MACD() < Signal()
;

Thanks in advance,
Rob





------------------------------------

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    amibroker-digest@xxxxxxxxxxxxxxx 
    amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/