How to add Lines to RSI

Post any software related questions or comments here. This is also the place to ask for help if you can't figure out how to do something in Wave59.
Post Reply
rlite4
Posts: 83
Joined: Wed Dec 16, 2015 6:14 pm
Contact:

How to add Lines to RSI

Post by rlite4 » Thu Dec 03, 2020 2:58 pm

Hi Earik,
Greetings.

I want to add some additional levels to the RSI indicator beyond the overbought and oversold, such as 50 and a few more. These levels can be fixed and need not be changeable from settings. Can you point me to the easiest way to do this - i.e. is there a way to modify the script for the RSI indicator or is that programmed in?

thanks,
rlite4

User avatar
earik
Site Admin
Posts: 474
Joined: Mon Dec 01, 2014 12:41 pm
Contact:

Re: How to add Lines to RSI

Post by earik » Thu Dec 03, 2020 7:36 pm

Hi Rlite4,

Yeah, you can add plot statements to the script. So here's what the RSI indicator looks like if you open it up in the script editor:

Code: Select all

input:price(close),length(14),overbought(70),oversold(30),
    color(red),zonecolor(blue),thickness(1);

plot1=rsi(price,length);
color1=color;
plot2=oversold;
plot3=overbought;
color2,color3=zonecolor;
thickness1,thickness2,thickness3=thickness;  
Note the plot1, plot2, and plot3 lines in there. Each one of those represents one indicator line. So let's say you wanted to add 50 in there. You could do it like this:

Code: Select all

plot4 = 50;
If you want to change the color, or thickness, or style, you could do those with:

Code: Select all

color4 = red;
thickness4 = 1;
style4 = ps_dot;
Note that color4 goes with plot4. If you want more lines, just work your way up. So plot5, plot6, etc.

When you're done, you go Qscript - Build Script, and it will re-build the RSI for you. You might consider changing the name, so it doesn't get overwritten if you ever do a reinstall. Do that in QScript - Script Properties. (The QScript menu appears at the top when you have the Script Editor open.)

Let me know if that doesn't get you going.

Earik

rlite4
Posts: 83
Joined: Wed Dec 16, 2015 6:14 pm
Contact:

Re: How to add Lines to RSI

Post by rlite4 » Fri Dec 04, 2020 11:51 pm

Hi Earik,

thanks that worked great :) . I got hung up a bit because I had scaling in properties set to price instead of screen.

Regards,
rlite4

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests