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

Re: Composite Indicator Help



PureBytes Links

Trading Reference Links

--- In amibroker@xxxx, "Keith Bennett" <kbennett@xxxx> wrote:
> 
> I want to show the McClellan Sumation Index in the Price window so 
> that I can use SAR amd MAs - so, I want an artificial ticker for 
this 
> index.
> 
> I am running the following on the ^NDX but when I display the index 
> (~SumInd) it is truncated top and bottom. Assistance appreciated.
> 
AdvI = IIf(C>Ref(C,-1),1,0);
DecI = IIf(C<Ref(C,-1),1,0);
AddToComposite( AdvI, "~AdvI", "V",1);
AddToComposite( DecI, "~DecI", "V",1);
Buy=0;

Keith, untill this line you have created "~AdvI" and "~DecI" 
artificial tickers.
Then you may use them as
AdvIssues=Foreign("~AdvI","V");
DecIssues=Foreign("~DecI","V");
in any formula like McClellan SI etc.

Your AdvI is 1 or 0 per stock, AdvI-DecI is either 1 or -1 and this 
EMA((Advi - deci),19) is nearly meaningless for a certain stock.
DT
> AddToComposite( Cum(EMA((Advi - deci),19) - EMA((Advi - 
> deci),39)), "~SumInd", "C",1); 
> Buy=0;
> 
> Keith (B)