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

RE: [amibroker] Equity to CSV File



PureBytes Links

Trading Reference Links




<FONT face=Arial color=#0000ff 
size=2>Thanks for your comments DT.
<FONT face=Arial color=#0000ff 
size=2> 
<FONT face=Arial color=#0000ff 
size=2>Yes, I did try your code and I got "exactly" the same results 
using your code as using StockNum. I quess you didn't try my code :-) 
<FONT face=Arial 
color=#0000ff size=2>Here is the example highlighting my problem again, this 
time I include your code for comparison: it doesn't change anything (see chart 
below, Red is mine, Blue is your code). 
<FONT face=Arial color=#0000ff 
size=2> 
<FONT face=Arial color=#0000ff 
size=2>The question remains unanswered: why does a stock that stops trading but 
that remains in the watchlist change the sequence of 'StockNum's in my 
composite? I expected to see a straight line. 
<FONT face=Arial color=#0000ff 
size=2> 
<FONT face=Arial color=#0000ff 
size=2>My chart shows that when my stock (#11) stops having data it's 
StockNum drops to zero and then the offset is added again at position 56. 
<FONT face=Arial 
color=#0000ff size=2>There is probably a very simple explanation but i don't 
see/understand what is happening. 
<FONT face=Arial color=#0000ff 
size=2><FONT 
face=Arial color=#0000ff size=2><SPAN 
class=870595922-07012004><FONT face=Arial color=#0000ff 
size=2> 
<FONT face=Arial color=#0000ff 
size=2>herman
<FONT face=Arial color=#0000ff 
size=2> 
<IMG alt="" hspace=0 
src="jpg00002.jpg" align=baseline border=0>
<FONT face=Arial color=#0000ff 
size=2> 
<FONT 
color=#ff0000>Buy=<FONT 
color=#ff0000>Sell=<FONT 
color=#ff0000>Short=<FONT 
color=#ff0000>Cover=<FONT 
color=#ff00ff>0<FONT 
color=#000000>; StockNum = Status<FONT 
color=#000000>("StockNum"<FONT 
size=2>); <FONT 
color=#ff0000>function<FONT 
face=Arial> DTid()    { 
   Listnum=0<FONT 
color=#000000>;id=0<FONT 
size=2>;    list = 
CategoryGetSymbols( 
categoryWatchlist<FONT 
size=2>, listnum );    
   for<FONT 
color=#000000>( i = 0; ( 
sym = StrExtract( list, i 
) ) != ""<FONT 
face=Arial>; i++ )       { 
      <FONT 
color=#ff0000>if(sym==<FONT 
color=#0000ff>Name<FONT 
color=#000000>()) {id=i;}       } 
   <FONT 
color=#ff0000>return<FONT 
face=Arial> id;    } 
T1[BarCount<FONT 
color=#000000>-StockNum-1<FONT 
size=2>] = StockNum; <FONT 
color=#0000ff>AddToComposite(T1,<FONT 
color=#ff00ff>"~T1",<FONT 
color=#ff00ff>"X"<FONT 
color=#000000>); T2[BarCount<FONT 
color=#000000>-StockNum-1<FONT 
size=2>] = DTid(); <FONT 
color=#0000ff>AddToComposite(T2,<FONT 
color=#ff00ff>"~T2",<FONT 
color=#ff00ff>"X"<FONT 
color=#000000>); SetForeign<FONT 
color=#000000>("~T1"<FONT 
size=2>); <FONT 
color=#0000ff>Plot(<FONT 
color=#ff0000>C,<FONT 
color=#ff00ff>"T1",<FONT 
color=#ff00ff>6,<FONT 
color=#ff00ff>1|<FONT 
color=#ff00ff>4<FONT 
color=#000000>); SetForeign<FONT 
color=#000000>("~T2"<FONT 
size=2>); <FONT 
color=#0000ff>Plot(<FONT 
color=#ff0000>C,<FONT 
color=#ff00ff>"T2",<FONT 
color=#ff00ff>4,<FONT 
color=#ff00ff>1|<FONT 
color=#ff00ff>4<FONT 
color=#000000>); GraphXSpace<FONT 
color=#000000> = 5 

  <FONT face=Tahoma 
  size=2>-----Original Message-----From: DIMITRIS TSOKAKIS 
  [mailto:TSOKAKIS@xxxxxxxxx]Sent: January 7, 2004 9:19 
  PMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] Re: 
  Need a Numerical Stock referenceHerman,Did you 
  really try the code [after the instructions] and didn´t work reliably 
  ?Because it works in my 4.50.6.If BEAS is #18 in the superWL60, it 
  will give ID=18 in any exploration [current stock, other WL including 
  BEAS, other group including BEAS etc].This ID=18 will be unique for 
  BEAS and, as far as I understood, it was your request.Do not forget to 
  move **ALL** stocks into WL60 **BEFORE** any exploration.I have no 
  doubt it works !!Dimitris Tsokakis--- In amibroker@xxxxxxxxxxxxxxx, 
  "Herman vandenBergen" <psytek@xxxx> wrote:> Thanks DT but 
  that doesn't work reliably.> > Your ID is not permanent across 
  watchlist or with changing watchlists. Take> my current problem. 
  All I want to do is store StockNumbers in an composite,> starting 
  with stock zero in the last bar. I intended to use the other price> 
  fields for temporary stock specific data, as an easy lookup table. I 
  think> quite a few users use this method...but see what unexpected 
  results I got.> Frankly I can't explain what is happening, perhaps 
  you can?> > If you have time do me a favour and load this simple 
  code into your AA. Make> sure you have BGEN (stopped trading for 
  QP2 2003/11/12) in your N100. Run a> Scan on All Quotations, then 
  Old-Backtest and click Equity to see the chart.> You'll get figure 
  1, now remove BGEN and repeat, and you'll get figure 2.> You might 
  also make BGEN current and you'll see that the chart is truncated.> 
  All this really messed with my data...> > thanks for any 
  explanation you may be able to give,> herman.> > 
  Buy=Sell=Short=Cover=0;> StockNum = Status("StockNum");> 
  T1[BarCount-StockNum-1] = StockNum;> 
  AddToComposite(T1,"~T1","X");> SetForeign("~T1");> 
  Plot(C,"T1",4,1|4);> GraphXSpace = 5;> > > Figure 
  1 - This is what you get with BGEN in the N100> > > 
  Figure 2 - This is how it should look!> > > 
  >   -----Original Message----->   From: 
  DIMITRIS TSOKAKIS [mailto:TSOKAKIS@xxxx]>   Sent: January 7, 
  2004 7:45 PM>   To: 
  amibroker@xxxxxxxxxxxxxxx>   Subject: [amibroker] Re: Need a 
  Numerical Stock reference> > >   
  Herman,>   The ID will be available if you send all stocks 
  to, say, WL60.>   Then,> >   
  Listnum=60;id=0;>   list = CategoryGetSymbols( 
  categoryWatchlist, listnum );>      for( i = 
  0; ( sym = StrExtract( list, i ) ) != ""; i++ )>   
  {>   if(sym==Name())>   
  {id=i;}>   }>   
  Filter=1;>   AddColumn(id,"ID");>   Dimitris 
  Tsokakis>   --- In amibroker@xxxxxxxxxxxxxxx, "Herman 
  vandenBergen" <psytek@xxxx>>   
  wrote:>   > Hello,>   
  >>   > Would anybody know if there is a way to assign, 
  or perhaps AB has>   it already>   > 
  internally, a permanent numerical ID to stocks?>   
  >>   > What I need is a fast NumericalStockID <-> 
  Symbol conversion>   routine (DLL?).>   > 
  Would it be possible to convert a Symbol's ASCII string to a 
  number>   within>   > the processing 
  range of AB? I don't like tables because they have>   to 
  be>   > maintained, loaded and saved.>   
  >>   > It is so much easier to work with permanent 
  reference numbers as>   they can be>   > 
  stored and manipulated in numerical arrays.>   
  >>   > Status("StockNum") doesn't work for me because 
  it changes with the>   watchlist>   > 
  or when a stock drops out half-way during an AA operation, I 
  found>   that out>   > the hard way 
  :-(>   >>   > Are there any rules that 
  govern the creation/issue of stock symbols?>   
  >>   > many thanks for any help you can 
  give,>   > herman.>


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








Yahoo! Groups Sponsor


  ADVERTISEMENT 









Yahoo! Groups Links
To visit your group on the web, go to:http://groups.yahoo.com/group/amibroker/ 
To unsubscribe from this group, send an email to:amibroker-unsubscribe@xxxxxxxxxxxxxxx 
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



Attachment: Description: ""