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

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



PureBytes Links

Trading Reference Links




<FONT face=Arial color=#0000ff 
size=2>Dimitris,
If CCI 
averages and you have renamed OHL to foreign values then why would not simply 
CCI(14) return the CCI for that foreign call?
<FONT face=Arial color=#0000ff 
size=2> 
Also 
does CCIa(foreign("^NDX","C") assume that the close value is in fact the average 
or is it making a calculation on its own to create the 
average?
<FONT face=Arial color=#0000ff 
size=2> 
While 
the description at TA A_Z supports your position that an average of C+H+L is 
required the AB documentation leads one to believe that a single value ( "Values 
other than Close") can be used.
<FONT face=Arial color=#0000ff 
size=2> 
<FONT face=Arial color=#0000ff 
size=2>Regards, 
Jayson 
<FONT face=Tahoma 
size=2>-----Original Message-----From: DIMITRIS TSOKAKIS 
[mailto:TSOKAKIS@xxxxxxxxx]Sent: Tuesday, September 02, 2003 2:55 
AMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] Re: 
optimizing trades based on a foreign CCI not working as 
expectedDave,CCI is an Avg function.Your 
request should go 
withPlot(CCI(14),"CCI",4,1);C=Foreign("^NDX","C");H=Foreign("^NDX","H");L=Foreign("^NDX","L"); 
Avg=(C+H+L)/3;IndexCCI=CCIa(Avg,14);Plot(IndexCCI,"IndexCCI",1,1);Buy=Cross(-100,IndexCCI);Sell=Cross(IndexCCI,100);All 
buy/sell signals now will be produced by ^NDX [or any other ticker you 
prefer] CCI crosses.Dimitris Tsokakis--- In 
amibroker@xxxxxxxxxxxxxxx, "Dave Merrill" <dmerrill@xxxx> 
wrote:> 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 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.