How can I change the Linear Regression Slope indy to use RSIstudy instead of MAstudy
Announcement
Collapse
No announcement yet.
LRS indicator w/RSI
Collapse
X
-
dianeparson
FWIW the MA is used in that script only as a proxy for current price to simplify the selection of the Source. Note in fact that the length of the MA is hard coded to 1.
Anyhow if you want to replace the MA with the RSI change lines 45 and 47
PHP Code:if(xMA == null) xMA = new MAStudy(1,0,Source,MAStudy.SIMPLE);
var vValue = xMA.getValue(MAStudy.MA);
PHP Code:if(xMA == null) xMA = new RSIStudy(nn, Source);
var vValue = xMA.getValue(RSIStudy.RSI);
At this point the LRS will be using the RSI study as the input.
Alex
Comment