♥ 0 |
hi again pete. i hope you are having a beautiful weekend. what im trying to do is add a simple moving average (5) to the RSI. not the moving average of the RSI but the one from whatever stock is on the chart. i want it to show in such a way that i can look for whenever the rsi crosses up over the sma5. this is what i got so far but it doesnt come out right (see screenshot 1). i just cant figure out why the sma5 does not draw inside the RSI but rather above it. also im aware that i could just add the 2 studies together (see screenshot 2) in one spot in the “edit studies” tab, but when i do it that way the position of the crossover moves, which makes it inaccurate to a degree: input smaprice = close; plot SMA = Average(smaprice[-displace], smalength); xUpSignal.SetHiding(!xshowBreakoutSignals); SMA.SetDefaultColor(GetColor(1)); input length = 14; def NetChgAvg = MovingAverage(averageType, price – price[1], length); plot RSI = 50 * (ChgRatio + 1); RSI.DefineColor(“OverBought”, GetColor(5)); thank you for your time! ru RESOLVED
Marked as spam
|
Please log in to post questions.