azakusa
Member
Anyone have any ideas on the code needed to make a simple horizontal line that follows RSI value? I have a thinkscript study which I located somewhere on the internet that follows price value in real time. Now looking to add the same to the RSI study.
Problem is that I am not much of a coder. I have played around with mixing the code below with the RSI code, but no luck. I can hack stuff by cut and pasting but understand little of the actual functionality behind it.
If its any help here is the script I am using to follow price value:
Any clues, ideas or a flat out solution would be hugely appreciated!
Thank you all.
Problem is that I am not much of a coder. I have played around with mixing the code below with the RSI code, but no luck. I can hack stuff by cut and pasting but understand little of the actual functionality behind it.
If its any help here is the script I am using to follow price value:
Code:
#Plots a Horizontal Line that follows the price value selected
input price=close;
input offset=0;
input length = 300;
def sma = SimpleMovingAvg(price, 1, length);
rec line = if IsNaN(sma) then line[1] else sma[offset];
plot priceline=if isnan(sma) then line else double.nan;
priceline.setpaintingStrategy(paintingStrategy.LINE);
priceline.setlineWeight(3);
priceline.setdefaultColor(color.green);
priceline.hideBubble();
Any clues, ideas or a flat out solution would be hugely appreciated!
Thank you all.