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

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



PureBytes Links

Trading Reference Links




<SPAN 
class=125110404-02092003>Dave,
<SPAN 
class=125110404-02092003> 
you 
change the OHLCV back tot the underlying stock at the bottom of your code. try 
simply....
<SPAN 
class=125110404-02092003> 
period = Optimize("period", 2, 1, 
100, 1);threshold = Optimize("threshold", 25, 0, 100, 25);O = 
Foreign("!VIX", "O");H = Foreign("!VIX", "H");L = Foreign("!VIX", 
"L");C = Foreign("!VIX", "C");V = Foreign("!VIX", "V");cc = 
CCI(period);Buy = Cross(cc, threshold);Sell = Cross(-threshold, 
cc);Short = Sell;Cover = 
Buy;----------------
Regards, 
Jayson 
<FONT face=Tahoma 
size=2>-----Original Message-----From: Dave Merrill 
[mailto:dmerrill@xxxxxxx]Sent: Monday, September 01, 2003 11:26 
PMTo: AmiBrokerSubject: [amibroker] optimizing trades 
based on a foreign CCI not working as expectedcan 
anyone tell me why these two tests give the same results for every indexI 
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 CCIof another index, I thought.but I get the same results 
no matter what foreign index I use, includingcontrarian 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 MerrillSend 
BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to 
suggest@xxxxxxxxxxxxx-----------------------------------------Post 
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A 
href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check 
group FAQ at: <A 
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Your use of Yahoo! Groups is subject to the <A 
href="">Yahoo! Terms of Service. 







Yahoo! Groups Sponsor


  ADVERTISEMENT 









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 the Yahoo! Terms of Service.