PureBytes Links
Trading Reference Links
|
I
haven't looked to closely at your code but you, generally, you cannot simply add
up the Volumes of many stocks; the number size will exceed the programs number
sizes.
<FONT face=Arial color=#0000ff
size=2>
Try
dividing the volume by 1000 or even 100000, before adding it in the
ATc.
<FONT face=Arial color=#0000ff
size=2>
<FONT face=Arial color=#0000ff
size=2>Another way might be to store the Log values of the volumes and later
convert the to normal numbers.
<FONT face=Arial color=#0000ff
size=2>
<FONT face=Arial color=#0000ff
size=2>herman
<FONT face=Tahoma
size=2>-----Original Message-----From: Michael.S.G.
[mailto:OzFalcon@xxxxxxxx]Sent: Thursday, June 26, 2003 1:55
AMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker]
Static Arrays???<FONT face="Courier New, Courier"
color=#008000>I can't figure out why I get (apparently) random results when
running the following code.It should be Storing the Highest Volume of the
day (regardless of which ticker produced it).After running a scan, An
explore should show the days highest volume, the assosiated stocks current
volume and what the difference is between the
two.KRMichael.// Store Highest Volume for the day.//
Set "n quotations = 1"// Scan Part:<FONT
face="Courier New, Courier">Buy = <FONT
face="Courier New, Courier" color=#ff00ff>0<FONT
face="Courier New, Courier">; <FONT face="Courier New, Courier"
color=#008000>// required by scan mode/* Use ATC as a "Highest Value"
Static array */F =
Foreign<FONT
face="Courier New, Courier">( <FONT face="Courier New, Courier"
color=#ff00ff>"~MyIndex",
"V"<FONT
face="Courier New, Courier">);addTO = <FONT
face="Courier New, Courier" color=#0000ff>IIf<FONT
face="Courier New, Courier"> (V > F,(V - F), <FONT
face="Courier New, Courier" color=#ff00ff>0<FONT
face="Courier New, Courier">); <FONT face="Courier New, Courier"
color=#0000ff>AddToComposite(addTO,
"~MyIndex"<FONT
face="Courier New, Courier">, <FONT face="Courier New, Courier"
color=#ff00ff>"V",<FONT
face="Courier New, Courier" color=#ff00ff>3<FONT
face="Courier New, Courier">
); <FONT
face="Courier New, Courier" color=#008000>// Explore Part:<FONT
face="Courier New, Courier">FH = <FONT face="Courier New, Courier"
color=#0000ff>Foreign( <FONT
face="Courier New, Courier" color=#ff00ff>"~MyIndex"<FONT
face="Courier New, Courier">, <FONT face="Courier New, Courier"
color=#ff00ff>"V");<FONT
face="Courier New, Courier" color=#0000ff>AddColumn<FONT
face="Courier New, Courier">(FH,<FONT face="Courier New, Courier"
color=#ff00ff>"FH-ForeignHighVolume"<FONT
face="Courier New, Courier">,<FONT face="Courier New, Courier"
color=#ff00ff>1);<FONT
face="Courier New, Courier" color=#0000ff>AddColumn<FONT
face="Courier New, Courier">(V,<FONT face="Courier New, Courier"
color=#ff00ff>"Stocks Volume"<FONT
face="Courier New, Courier">,<FONT face="Courier New, Courier"
color=#ff00ff>1.2);<FONT
face="Courier New, Courier" color=#0000ff>AddColumn<FONT
face="Courier New, Courier">(addTO,<FONT face="Courier New, Courier"
color=#ff00ff>"To Add",<FONT
face="Courier New, Courier" color=#ff00ff>1.2<FONT
face="Courier New, Courier">);Filter = <FONT
face="Courier New, Courier" color=#ff00ff>1<FONT
face="Courier New, Courier">;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.
|