The RSIa function

kkseal

Well-Known Member
#1
Hi,

Has anybody used the RSIa function in AB in their coding? Does it work with user-defined arrays or just predefined arrays (in AB)?

Thanks & Regards,
Kalyan.
 

kkseal

Well-Known Member
#3
Hi kalyan

RSIa is available as a standrad in Ami. Anyway i am enclosing it. It does work.
Hi Karthik,

thanks for your reply. The problem is with that 'Price field'. For the code snippet you have posted, the ParamField function returns an array of either O,H,L,C(default),Avg,Vol,OpenInt - all of which are pre-defined arrays of AB.
One can also use in RSIa a pre-defined function that returns an array (like MA, EMA, MACD etc.). But what if i want to use a simillar function of my own that also returns an array (or even an array made out of a built-in array - like the 4 bar symmetrical filter of CLOSE used by Ehler in the SRSI code). This is where the problem arises.

My problem is that i want to build an RSI using the array returned by a filter of my own (instead of raw prices). So i use what i call the K-FILTER (in the form KFILTER(C,5) as the input array field of the RSIa function). But it doesn't seem to work. Strangely it does not generate any syntax error. When the formula is applied i get a smoother & sharper RSI alright in a new pane; but once i click on the pane the indicator simply collapses into a straight line :eek:

The same K-FILTER function (used as an #include) works quite well in other indicators where i've done the coding from scratch.

If you notice the RSIa function has not been used in the SRSI code as well. They have rewritten the RSI code instead (but even that is not totally correct imo. A lookback period has been initialized but not subsequently used. Going by Wilder, the RSI calculation for the 1st 14 periods from the lookback is quite different from the subsequent 14 period tranches That is why i thought of using the built-in RSIa function initially to reduce the workload).

Eventually off-course i'd have to code the RSI from scratch anyway as i want to substitute the internal Wilder's smoothing (too slow) with my own K-FILTER. Just wanted to get the initial look & feel using RSIa. But unfortunately it seems to be a bit dumb :)

Regards,
Kalyan.
 
#4
hi kartik ji
though it is childesh, but still plz help me to build afl/function/filter in ami/meta/fibo ( any one, )
my requirments
1) crossover of %R (14) with MA (9) - below "0"
2) crossover of CCI (20) -----"----- - below oversold zone
3) crossover of RSI (21) -----"------ below "0"

a buy signal is created when all 3 crossoves done within 5 days.

plz (if u get time, ) do it for me .
tnx
dayal