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

RE: [amibroker] Introducing OHLC-Composites



PureBytes Links

Trading Reference Links




Well, 
each night I create 13 composites from a filtered watchlist which produce a 
universe index then 1 each for the 12 sectors. I link these sector indexes 
to my charts as a foreign call which allows me to see for instance the 
information index when I pull up CSCO. 
I also 
run a relative strength exploration against each sector index and the universe 
index. This allows me to have a feel for individual sector strength/weakness. 

 
Regards, 
Jayson 
 
<IMG alt="" hspace=0 src="gif00622.gif" align=baseline 
border=0>
<FONT face=Tahoma 
size=2>----<FONT 
face=Arial> 
<FONT face=Tahoma 
size=2><IMG alt="" hspace=0 
src="gif00623.gif" align=baseline border=0>
<FONT face=Tahoma 
size=2> 
<FONT face=Tahoma 
size=2> 
<FONT face=Tahoma 
size=2> -Original 
Message-----From: Herman vandenBergen 
[mailto:psytek@xxxxxxxx]Sent: Tuesday, December 09, 2003 9:13 
PMTo: amibroker@xxxxxxxxxxxxxxxSubject: RE: [amibroker] 
Introducing OHLC-Composites
<FONT face=Arial color=#0000ff 
size=2>Jayson: Thank you! 
<FONT face=Arial color=#0000ff 
size=2> 
<FONT face=Arial color=#0000ff 
size=2>Also: darn it! 
<FONT face=Arial color=#0000ff 
size=2> 
<FONT face=Arial color=#0000ff 
size=2>I have been working with other calculated values for the composites and I 
didn't actually check the simple price composites i used for my 
example. My calculated values resulted in loss of the OHLC 
relationship and I assumed that my experience was common to common price 
arrays also. It turns out it is not. 
<FONT face=Arial color=#0000ff 
size=2> 
<FONT face=Arial color=#0000ff 
size=2>So, that clarifies the internal bar relationship problem I had :-) this 
is great.
<FONT face=Arial color=#0000ff 
size=2> 
<FONT face=Arial color=#0000ff 
size=2>Now the question is what are people doing with the OHLC-Composites? 
Anybody care to share?
<FONT face=Arial color=#0000ff 
size=2> 
<FONT face=Arial color=#0000ff 
size=2>herman
<FONT face=Arial color=#0000ff 
size=2> 
<FONT face=Arial color=#0000ff 
size=2> 
<FONT face=Arial color=#0000ff 
size=2> 
<FONT face=Arial color=#0000ff 
size=2> 

  <FONT face=Tahoma 
  size=2>-----Original Message-----From: Jayson 
  [mailto:jcasavant@xxxxxxxxxxx]Sent: December 10, 2003 8:10 
  AMTo: amibroker@xxxxxxxxxxxxxxxSubject: RE: [amibroker] 
  Introducing OHLC-Composites
  <FONT face=Arial color=#0000ff 
  size=2>Herman,
  I 
  use OHLC composites all the time. As an example I  run the following code 
  against a watch list to update my sector indexes
  <FONT face=Arial color=#0000ff 
  size=2> 
  
  //creates index by sector
  isym=<FONT 
  color=#0000ff>"~i"+<FONT 
  size=2>SectorID(<FONT 
  size=2>1<FONT face=Arial 
  color=#0000ff>);
  AddToComposite<FONT 
  color=#282828 size=2>(C<FONT 
  face=Arial>,isym,<FONT color=#ff00ff 
  size=2>"C"<FONT 
  face=Arial>);
  AddToComposite<FONT 
  color=#282828 size=2>(O<FONT 
  face=Arial>,isym,<FONT color=#ff00ff 
  size=2>"O"<FONT 
  face=Arial>);
  AddToComposite<FONT 
  color=#282828 size=2>(H<FONT 
  face=Arial>,isym,<FONT color=#ff00ff 
  size=2>"H"<FONT 
  face=Arial>);
  AddToComposite<FONT 
  color=#282828 size=2>(L<FONT 
  face=Arial>,isym,<FONT color=#ff00ff 
  size=2>"L"<FONT 
  face=Arial>);
  AddToComposite<FONT 
  color=#282828 size=2>(1<FONT 
  color=#282828 size=2>,isym,<FONT color=#ff00ff 
  size=2>"V"<FONT 
  face=Arial>); <FONT 
  face=Arial>//counts the sextor components
  <SPAN 
  class=485135623-09122003> 
  <FONT face=Arial 
  size=2>Why do you feel the High and low data is inaccuate? To average I plot 
  
  PlotOHLC<FONT 
  face=Arial>(<FONT 
  color=#000000>O<FONT 
  color=#282828>/V<FONT 
  face=Arial>,<FONT 
  color=#000000>H<FONT 
  color=#282828>/V<FONT 
  face=Arial>,<FONT 
  color=#000000>L<FONT 
  color=#282828>/V<FONT 
  face=Arial>,<FONT 
  color=#000000>C<FONT 
  color=#282828>/V<FONT 
  face=Arial>," 
  Sector",<FONT 
  color=#000000>colorWhite<FONT 
  color=#282828>,64<FONT 
  color=#282828>);
  <FONT face=Arial 
  color=#0000ff size=2>Perhaps I do not understand your 
  question....
   
   
  Regards, 
  Jayson 
  <FONT face=Tahoma 
  size=2>-----Original Message-----From: Herman vandenBergen 
  [mailto:psytek@xxxxxxxx]Sent: Tuesday, December 09, 2003 6:27 
  PMTo: AmiBrokerSubject: [amibroker] Introducing 
  OHLC-Composites
  Most composites 
  display just one variable or, if they use more, they are usually 
  independent variables. This means that generally speaking composites 
  do not carry enough information to apply standard OHLC technical 
  analysis, like RSI, CMO, SAR, etc. to them. 
  <SPAN 
  class=120583612-09122003> 
  If we could make 
  our Composites embody all four price arrays (OHLC), in an accurate 
  representation of the market they represent, then they would be much more 
  useful. If you have played with this type of formulas you will know that you 
  cannot simply create four separate OHLC composites and use these 
  prices in a standard OHLC bar; the resulting price bar is usually distorted to 
  the point it becomes useless.
  <SPAN 
  class=120583612-09122003> 
  Below you'll find 
  one way to create OHLC-Composites. While the Open and Close probably 
  accurately represent the market, the High and the Low appear to have lost 
  their significant information (they don't change much). What is needed is a 
  better way to calculate the OHLC-Composite's High and Low price. 
  
  <SPAN 
  class=120583612-09122003> 
  Any constructive 
  help from our resident Composite-Wizards to help make the 
  OHLC-Composite more meaningful will be much appreciated! 
  
  <SPAN 
  class=120583612-09122003> 
  <SPAN 
  class=120583612-09122003>herman
  <SPAN 
  class=120583612-09122003> 
  <IMG alt="" 
  hspace=0 src="jpg00383.jpg" align=baseline 
  border=0>
  <SPAN 
  class=120583612-09122003> 
  <SPAN 
  class=120583612-09122003> 
  <FONT face=Arial color=#000000 
  size=2>// Experimenting with OHLC-Composites - Herman - 
  09DEC2003 
  // Step 1: Run Scan #1 All-Quotation Scan on 
  your Watchlist<FONT 
  color=#000000> // Step 2: Run Scan #2 on a 
  Single stock<FONT 
  color=#000000> // Step 3: Run OldBacktester 
  on a Single stock, Click Equity or<FONT 
  face=Arial> // select 
  CandleComp in your Workspace and display in Candle 
  format<FONT 
  color=#000000> Buy<FONT 
  color=#000000>=Sell<FONT 
  color=#000000>=Short<FONT 
  color=#000000>=Cover<FONT 
  color=#000000>=0<FONT 
  size=2>; <FONT 
  color=#000000>// Scan #1 on your watchlist<FONT 
  size=2> Bo = <FONT 
  color=#ff0000>O<FONT 
  color=#000000>;   // Open price 
  is used as reference<FONT 
  face=Arial> Bh = <FONT 
  color=#ff0000>H/<FONT 
  color=#ff0000>O<FONT 
  color=#000000>;   // HLC are 
  averaged as their ratio to the Open price<FONT 
  size=2> Bl = <FONT 
  color=#ff0000>L/<FONT 
  color=#ff0000>O<FONT 
  color=#000000>; Bc = C<FONT 
  color=#000000>/O<FONT 
  size=2>; <FONT 
  color=#0000ff>AddToComposite(Bo,<FONT 
  color=#ff00ff>"~Bo",<FONT 
  color=#ff00ff>"X"<FONT 
  color=#000000>); AddToComposite<FONT 
  color=#000000>(Bh,"~Bh"<FONT 
  color=#000000>,"X"<FONT 
  size=2>); <FONT 
  color=#0000ff>AddToComposite(Bl,<FONT 
  color=#ff00ff>"~Bl",<FONT 
  color=#ff00ff>"X"<FONT 
  color=#000000>); AddToComposite<FONT 
  color=#000000>(Bc,"~Bc"<FONT 
  color=#000000>,"X"<FONT 
  size=2>); <FONT 
  color=#0000ff>AddToComposite(<FONT 
  color=#ff00ff>1,<FONT 
  color=#ff00ff>"~Bcount",<FONT 
  color=#ff00ff>"X"<FONT 
  color=#000000>); // Scan #2 on one 
  single stock!<FONT 
  color=#000000> n = Foreign<FONT 
  color=#000000>("~Bcount"<FONT 
  color=#000000>,"X"<FONT 
  size=2>); Ot = <FONT 
  color=#0000ff>Foreign(<FONT 
  color=#ff00ff>"~Bo",<FONT 
  color=#ff00ff>"X"<FONT 
  color=#000000>)/n; Ht = Ot*Foreign<FONT 
  color=#000000>("~Bh"<FONT 
  color=#000000>,"X")/n; 
  // Reconstruct HLC wrt average 
  Open<FONT 
  color=#000000> Lt = Ot*Foreign<FONT 
  color=#000000>("~Bl"<FONT 
  color=#000000>,"X"<FONT 
  size=2>)/n; Ct = Ot*<FONT 
  color=#0000ff>Foreign(<FONT 
  color=#ff00ff>"~Bc",<FONT 
  color=#ff00ff>"X"<FONT 
  color=#000000>)/n; AddToComposite<FONT 
  color=#000000>(Ot,"~CandleComp"<FONT 
  color=#000000>,"O"<FONT 
  size=2>); <FONT 
  color=#0000ff>AddToComposite(Ht,<FONT 
  color=#ff00ff>"~CandleComp",<FONT 
  color=#ff00ff>"H"<FONT 
  color=#000000>); AddToComposite<FONT 
  color=#000000>(Lt,"~CandleComp"<FONT 
  color=#000000>,"L"<FONT 
  size=2>); <FONT 
  color=#0000ff>AddToComposite(Ct,<FONT 
  color=#ff00ff>"~CandleComp",<FONT 
  color=#ff00ff>"C"<FONT 
  color=#000000>); // Indicator, from 
  OldBacktester or Indicator window<FONT 
  face=Arial> n = <FONT 
  color=#0000ff>Foreign(<FONT 
  color=#ff00ff>"~Bcount",<FONT 
  color=#ff00ff>"X"<FONT 
  color=#000000>); Ot = Foreign<FONT 
  color=#000000>("~Bo"<FONT 
  color=#000000>,"X"<FONT 
  size=2>)/n; Ht = Ot*<FONT 
  color=#0000ff>Foreign(<FONT 
  color=#ff00ff>"~Bh",<FONT 
  color=#ff00ff>"X")/n; <FONT 
  color=#000000>// Reconstruct HLC wrt average 
  Open<FONT 
  color=#000000> Lt = Ot*Foreign<FONT 
  color=#000000>("~Bl"<FONT 
  color=#000000>,"X"<FONT 
  size=2>)/n; Ct = Ot*<FONT 
  color=#0000ff>Foreign(<FONT 
  color=#ff00ff>"~Bc",<FONT 
  color=#ff00ff>"X"<FONT 
  color=#000000>)/n; PlotOHLC<FONT 
  color=#000000>(Ot,Ht,Lt,Ct,"OHLC-Composite Candle 
  Chart",1<FONT 
  color=#000000>,<FONT 
  color=#ff0000>styleCandle<FONT 
  face=Arial>); <FONT 
  color=#ff0000>Title = <FONT 
  color=#0000ff>EncodeColor(<FONT 
  color=#ff0000>colorWhite)+<FONT 
  color=#ff00ff>"N100 OHLC-Composite Candle Chart"<FONT 
  size=2>; <FONT 
  color=#ff0000>GraphXSpace = <FONT 
  color=#ff00ff>5 
  <SPAN 
  class=120583612-09122003> 
  <SPAN 
  class=120583612-09122003> Send 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. 
  Send 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. 
Send 
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












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.

Attachment: Description: ""

Attachment: Description: ""

Attachment: Description: ""