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

[amibroker] optimizing trades based on a foreign CCI not working as expected


  • To: "AmiBroker" <amibroker@xxxxxxxxxxxxxxx>
  • Subject: [amibroker] optimizing trades based on a foreign CCI not working as expected
  • From: "Dave Merrill" <dmerrill@xxxxxxx>
  • Date: Mon, 1 Sep 2003 20:32:17 -0700

PureBytes Links

Trading Reference Links

can anyone tell me why these two tests give the same results for every index
I tried?

both versions go long and short based on a CCI, optimizing for best returns.
version 1 uses the CCI of the issue under test, and version 2 uses the CCI
of another index, I thought.

but I get the same results no matter what foreign index I use, including
contrarian ones like the VIX you see below.

what am I missing?

thanks,

dave


----------------
VERSION 1
----------------
period = Optimize("period", 2, 1, 100, 1);
threshold = Optimize("threshold", 25, 0, 100, 25);

cc = CCI(period);

Buy = Cross(cc, threshold);
Sell = Cross(-threshold, cc);
Short = Sell;
Cover = Buy;


----------------
VERSION 2
----------------
period = Optimize("period", 2, 1, 100, 1);
threshold = Optimize("threshold", 25, 0, 100, 25);

saveO = O;
saveH = H;
saveL = L;
saveC = C;
saveV = V;
O = Foreign("!VIX", "O");
H = Foreign("!VIX", "H");
L = Foreign("!VIX", "L");
C = Foreign("!VIX", "C");
V = Foreign("!VIX", "V");
cc = CCI(period);
O = saveO;
H = saveH;
L = saveL;
C = saveC;
V = saveV;

Buy = Cross(cc, threshold);
Sell = Cross(-threshold, cc);
Short = Sell;
Cover = Buy;
----------------


Dave Merrill


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark
Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/l.m7sD/LIdGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

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