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

[amibroker] Re: AdvIssues() and Summation() problems



PureBytes Links

Trading Reference Links

Spread? is that your name or why don't you put name on post?
For the code you have to work you need to use the "calculate
composites" function under the Symbols tab.  This calculates the
Advances/Declines for the market your choose "nasdaq, nyse or amx".
Once that is done it should work.  I have trouble with it calculating
the nyse but for nasdaq and amx it works fine.  I use the code shown
below.

Dick H. 

_SECTION_BEGIN("McClellan Sum Test");
// McClellan Summation Index
tgl = ParamToggle("Index", "NYSE|NASD", 0);
if (tgl) index = "NASD"; else index = "NYSE"; // select the index

aI = Foreign("~" + index, "Open"); 
dI = Foreign("~" + index, "Close");
TP = EMA( 1000*( AdvIssues() - DecIssues() ) / ( AdvIssues() +
DecIssues() ),19); // the so called 10% index
FP = EMA( 1000*( AdvIssues() - DecIssues() ) / ( AdvIssues() +
DecIssues() ),39); // the so called 5% index
//ad = aI - dI; // an array of daily H - L
MSI = ( 9 * TP) + ( 19 * FP) ;
//ad = aI - dI; // an array of daily H - L
  
Plot(MSI,"McClellan.Summ.Indx Miekka",colorBlue,1|styleThick);
Plot(EMA(MSI,21),"21 EMA MSI",colorRed,1);
Plot(1000,"1000",colorGreen, 1);
Plot(0,"Zero",colorBrown, 1|styleThick);
GraphXSpace = 3;



--- In amibroker@xxxxxxxxxxxxxxx, "spread4321" <spread4321@xxx> wrote:
>
> I used to use this code to calculate McClellan Summation Index. After
> re-installing the amibroker and loaded the symbols information, the
> composite calculate tool does not do anything any more. I noticed so
> symbols loaded are no longer traded. Does it cause the calculation to
> fail?
> 
> _SECTION_BEGIN("Summation");
> /*
> McClellan Summation Index
> 
> */
> 
> Plot( Cum( EMA( AdvIssues()-DecIssues(), 19 ) - EMA(
> AdvIssues()-DecIssues(), 39 ) ), "McClellan Summation Index", colorRed);
>  
> _SECTION_END();
>






Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html

 
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:
    http://docs.yahoo.com/info/terms/