hi
can any seniour here explain plz ,
how to Plot a three-period RSI of a one-period rate of change (the daily net change). in amibroker.
i am reading smart street , in which a stratgery momentum pinball is mentioned , i don't understand how to plot this one , can some body help me plz........
Re: how toPlot a three-period RSI of a one-period rate of change (the daily net chang
here it is
HTML:
C=ROC(C,1);
rs=RSI(3);
Plot(rs,"3 RSI of 1 Day ROC",1,1);
Plot(MA(rs,3)," Signal 3 RSI of 1 Day ROC",9,1);
Plot(70,"OB",4,1);
Plot(30,"OS",5,1);
Plot(50,"MID",6,1);
C=ROC(C,1);
rs=RSI(3);
Plot(rs,"3 RSI of 1 Day ROC",1,1);
Plot(MA(rs,3)," Signal 3 RSI of 1 Day ROC",9,1);
Plot(70,"OB",4,1);
Plot(30,"OS",5,1);
Plot(50,"MID",6,1);
Re: how toPlot a three-period RSI of a one-period rate of change (the daily net chang
here it is
HTML:
C=ROC(C,1);
rs=RSI(3);
Plot(rs,"3 RSI of 1 Day ROC",1,1);
Plot(MA(rs,3)," Signal 3 RSI of 1 Day ROC",9,1);
Plot(70,"OB",4,1);
Plot(30,"OS",5,1);
Plot(50,"MID",6,1);
Johnny, that is not correct. C is a reserved symbol in Amibroker language. It stands for Close price. You can not use C as any other variable. Therefore, you can not write C = ROC(C, 1);
In addition, what Sanju asked is 3 period RSI of 1 period ROC of Close. What you have given is 3 period moving average of 3 period RSI of Close.
The correct code is
C-like:
R = RSIa(ROC(C, 1), 3);
Plot(R, "RSI(3) of ROC(1)", color, style,.....);
color, style etc. are as per your choice.
RSI calculates the RSI of Close only, not any other field. RSIa calculates RSI of any field like High, Low, Open, ROC etc.
Johnny, that is not correct. C is a reserved symbol in Amibroker language. It stands for Close price. You can not use C as any other variable. Therefore, you can not write C = ROC(C, 1);
You can assign to OHLC arrays. It is not required for functions like RSI since there is RSIa.
But it may be useful for functions depending on OHLC and not having array arguments e.g. StochK , MACD, ....
and you want a function to calculate using different arrays other than default prices.
If you want to restore original OHLC then all there is required is calling RestorePriceArrays afterwards.
I have not posted any code. I am not ID @johnnypareek.
That being said your previous quoted statement was wrong. (And you did not mention any restoring. I did. But even without restoring it is not wrong to assign custom arrays to OHLC e.g. single AFL just plotting/outputting MACD() with custom array.)
BTW upper bold one is incorrect too.
It is 3 period MA of 3 period RSI of ROC(C,1);
He was using the same rs variable. And "rs" is not calculating using default Close but ROC(C,1) since latter one is assigned to first one before. The code in post #2 is correct. And with or without using RestorePriceArrays it ouputs same results in both cases.
I have not posted any code. I am not ID @johnnypareek.
That being said your previous quoted statement was wrong. (And you did not mention any restoring. I did. But even without restoring it is not wrong to assign custom arrays to OHLC e.g. single AFL just plotting/outputting MACD() with custom array.)