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

Re: [amibroker] Re: SetForeign problem.,..



PureBytes Links

Trading Reference Links




Tomasz,
My WL20 has ^NDX, AAPL and 
AMZN.
The last 5 bars of AAPL are 
missing.
I use the 4.50 Help example to calculate 
the average and then the 

AddToComposite<FONT 
face="Arial Black">(C,"~C"<FONT 
size=2>,"C");
AddToComposite<FONT 
face="Arial Black">(1<FONT 
size=2>,"~COUNT",<FONT 
size=2>"V");Buy=0<FONT 
size=2>;
The result should be the same, but they are 
not.
The last 5 green points are 
510.04
508.92
511.85
514.39
511.93
a. These strange numbers are not the average 
of WL20 for the last 5 bars.
b. I do not know how these numbers are 
calculated.
c. I believe above a AND b do give a 
reason for questions, except if you see the black and green lines to be ...the 
same.
As for your "there is no reason 
to repeat all of that over and over again."
I really have no problem to repeat the 
same question 1000 times.
The last value, for example
^NDX 1470.38
AMZN 43.01
AAPL {EMPTY}
ATC average 756.695 [correct and equal to 
(1470.38+43.01)/2
Avg is 511.93 [wrong, unexplained, not 
even equal to (1470.38+43.01)/3]
The code was your example, I added two 
lines for the ATC average
 function CreateAverageForWatchList( listnum ) { 
   // retrive comma-separated list of symbols in watch list 
   list = CategoryGetSymbols( categoryWatchlist, listnum ); 

   Average = 0; // just in case there are no watch 
list members 
   for( i = 0; ( sym = StrExtract( list, i ) ) != ""; 
i++ )    {       f = Foreign( sym, 
"C" );       if( i == 0 ) Average = f; 
      else Average = Average + f;    
}    return Average / i; // divide by number of components } 

Plot( CreateAverageForWatchList( 20 ), "Avg of WL 20", 
colorBrightGreen ); Plot(Foreign("~C","C")/Foreign("~COUNT","V"),"ATC 
average",1,8);GraphXSpace=5;
This is the final effort to make you see the 
question.
I will not send anything to the 
suggestions address, I will prefer the mess of these thousands
of mails and, perhaps, my mail will be 
"lost".
If you do not feel that this list is the 
oxygen for your business, I have no problem, you may keep
on reading only the suggestions.
As for my intentions this Saturday 
afternoon, 
*I have no holes in my database, 
*I do not need this code
*I will not make more money if you correct 
YOUR example in YOUR software
*I will not improve my fishing skills and 
results
*the ladies will not love me more [there is 
no ...H>HIGHEST]
I just want this nice tool to be better and 
better .
Dimitris Tsokakis
 


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




Click Here















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:
finalT.gif

Attachment: Description: "Description: GIF image"