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

[amibroker] Re: AddToComp ~SUMRSI (For DT)



PureBytes Links

Trading Reference Links

Keith,

Certainly, paste in your AA the

s1=IIf(RSI()>=0 AND RSI()<=100,RSI(),0);
values2 = s1;
AddToComposite(s1,"~SUMRSI","C");
AddToComposite(1,"~COUNT","V");
Buy=0;

and scan your database for all stocks , all quotations.
Then the artificial tickers "~SUMRSI" and "~COUNT" will be created 
and automatically placed in Group253.
After the scan, you are ready to use the new "tickers" in any 
amibroker window.
You should run the formula after the data update, to have the 
new "ticker" values.
A hint BEFORE the scan : Your database should be free of holes 
[missing data], else the artificial tickers have problems and are 
practically useless.
The 3rd line adds all the RSIs of the database, the 4th line adds a 1 
per stock. Consequently, if you divide the Foreign("~SUMRSI","C") by 
the population Foreign("~COUNT","V") you will have
(RSI1+RSI2+RSI3+...+RSIn)/n
ie the MeanRSI.
In a similar manner you may create the MeanStochD, the MeanCMO etc.
See also related topics in the library, after reding the Help 
instructions for AddToComposite() function.
Dimitris Tsokakis


--- In amibroker@xxxxxxxxxxxxxxx, "Keith Bennett <kbennett@xxxx>" 
<kbennett@xxxx> wrote:
> Hi Dimitris,
> 
> Could you post (or provide a link to) the afl used to create 
~SUMRSI 
> in #33216.
> 
> Thanks
> Keith


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