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

[amibroker] Re: Setting Beginning Date of Test Period



PureBytes Links

Trading Reference Links




<FONT face=Arial color=#0000ff 
size=2>Clyde
 
The 
answer lies in Addtocomposite.  You may assign a watch list to run the 
calculations on when creating the composite (AA). You may store the accumulated 
values in any of the composite fields, so here we store up to close , dn to 
open, upvol to High and dnvol to Low. Run the entire code in AA against the 
watchlist of your choice then copy the entire code to IB to plot the values with 
your favorite chart (foreign allows you to see the plot 
always)
<FONT face=Arial color=#0000ff 
size=2> 
 
up=<FONT 
face=Arial color=#0000ff>C<FONT 
color=#0000ff>>Ref<FONT 
size=2>(C<FONT 
color=#0000ff>,-1<FONT 
color=#282828 size=2>);
dn=<FONT 
face=Arial color=#0000ff>C<FONT 
color=#0000ff><Ref<FONT 
size=2>(C<FONT 
color=#0000ff>,-1<FONT 
color=#282828 size=2>);
upvol=<FONT 
color=#0000ff>IIf(up,<FONT 
size=2>V<FONT 
size=2>/C<FONT 
color=#0000ff>,0<FONT 
color=#282828 size=2>);
dnvol=<FONT 
color=#0000ff>IIf(dn,<FONT 
size=2>V<FONT 
size=2>/C<FONT 
color=#0000ff>,0<FONT 
color=#282828 size=2>);
<FONT face=Arial 
color=#0000ff> 
<FONT face=Arial color=#0000ff 
size=2>//stores the ad calculations in a composite called 
~Ad
AddToComposite<FONT 
face=Arial>(up,~Ad,<FONT 
color=#ff00ff>"C"<FONT 
face=Arial>);
AddToComposite<FONT 
face=Arial>(dn,~Ad,<FONT 
color=#ff00ff>"O"<FONT 
face=Arial>);
AddToComposite<FONT 
face=Arial>(upvol,~Ad,<FONT 
color=#ff00ff>"H"<FONT 
face=Arial>);
AddToComposite<FONT 
size=2>(dnvol,~Ad,<FONT 
color=#ff00ff>"L");
<FONT 
color=#282828> <FONT 
size=2>
GraphXSpace<FONT 
size=2>=15<FONT 
color=#0000ff>;
pds=<FONT 
size=2>Param("Smoothing 
Periods",11<FONT 
size=2>,1,<FONT 
size=2>20,1<FONT 
color=#282828 size=2>);<FONT 
color=#282828 size=2>
ADissues=<FONT 
size=2>Foreign(Ad,"C"<FONT 
color=#282828 size=2>);
Dissues=<FONT 
size=2>Foreign(Ad,"O"<FONT 
color=#282828 size=2>);
Advol=<FONT 
size=2>Foreign(Ad,"h"<FONT 
size=2>);// High 
vol
Dvol=<FONT 
size=2>Foreign(Ad,"l"<FONT 
size=2>);//low 
vol
addecvol=<FONT 
size=2>EMA(Sum<FONT 
size=2>(advol,pds),pds)-EMA(<FONT 
size=2>Sum<FONT 
color=#0000ff>(dvol,pds),pds);
Plot(addecvol,<FONT color=#ff00ff 
size=2>"AD VOL",<FONT color=#0000ff 
size=2>IIf(addecvol><FONT 
color=#ff00ff size=2>0,<FONT 
color=#ff00ff size=2>5,<FONT 
color=#ff00ff size=2>4),<FONT 
color=#ff00ff size=2>2);<FONT 
color=#0000ff size=2>
Plot(<FONT color=#0000ff 
size=2>EMA(adissues,pds)-<FONT 
color=#0000ff size=2>EMA<FONT color=#282828 
size=2>(dissues,pds),"A/d"<FONT 
color=#282828 size=2>,1<FONT 
color=#282828 size=2>,1<FONT 
color=#282828 size=2>|<FONT 
color=#000000>styleOwnScale<FONT color=#282828 
size=2>);
<FONT 
color=#0000ff>//Plot(EMA(dissues,pds),"Decliners",4,1);<FONT 
color=#0000ff size=2>
PlotGrid(<FONT color=#ff00ff 
size=2>0,<FONT 
color=#000000>colorWhite);
 
Title<FONT 
size=2>="Advance/Decline"+<FONT 
size=2>"\n Advancing Issues " +<FONT 
size=2>WriteVal(EMA<FONT 
size=2>(Adissues,pds),1.0)+<FONT 
size=2>" Declining Issues "+<FONT 
size=2>WriteVal(EMA<FONT 
size=2>(dissues,pds),1.0<FONT color=#282828 
size=2>);
 
Regards, 
Jayson 
<FONT face=Tahoma 
size=2>-----Original Message-----From: nb9trade 
[mailto:clyde@xxxxxxxxxxx]Sent: Thursday, January 15, 2004 8:01 
AMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] Re: 
Advance Declone LineA few more questions1. Since 
the a/d applies to a group of stocks, Is there a difference in the way it is 
typed or pasted in? Does it go on the indicator builder screen, the same as 
other formulas? How do you designate which stocks to consider?2. 
What is the proceedure for making it apply to a specific group of stocks? 
e.g. NYSE,NASDQ or better a watch list?3. I am assuming that if someone 
want the traditional line, it would be easy enought to change the formula? 
as belowDifference = ( AdvIssues - DecIssues) ADLine = Cum( DiffSqrt 
);Clyde--- In amibroker@xxxxxxxxxxxxxxx, 
"Graham" <gkavanagh@xxxx> wrote:> From the help screens> 
> Advance-Decline line (AD-Line)> Line measuring advances and 
declines that reflects market breadth. In its> simplest form ADLine 
is a summation over time of the net daily difference> between the 
number of advancing issues and the number of declining issues.> 
AmiBroker uses slightly improved formula which takes into account 
also> number of unchanged issues. The exact AFL formula for 
AmiBroker's ADLine is:> > Difference = ( AdvIssues() - 
DecIssues() )/ ( UncIssues() + 1 );> DiffSqrt = IIF( Difference > 0, 
sqrt( Difference ), - sqrt( - Difference )> );> ADLine = Cum( 
DiffSqrt );> > This is a classical indicator which tends to give a 
good reading of the> overall strength of the market. A break in the 
A/D line usually proceeds a> break in prices. Look for 
non-confirmation and divergence.> > See also AFL Function 
reference: AFL Function: adline()> > 
Cheers,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 


Yahoo! Groups Links
  To visit your group on the web, go to:<A 
  href="">http://groups.yahoo.com/group/amibroker/  

  To unsubscribe from this group, send an email to:<A 
  href="">amibroker-unsubscribe@xxxxxxxxxxxxxxx  

  Your use of Yahoo! Groups is subject to the <A 
  href="">Yahoo! Terms of Service. 



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.