# Vertical RSI-Based Time/Price-Change Zone

#### Huffmac90

##### Member
Gents,

Playing with a new entry exit code that works pretty well but creates a terrible blob cloud across the screen. Trying to get it to just plot a vertical line where the cloud starts and stops.

Code:
``````def RSI = reference RSI(length = 13).RSI;
def highRSI = Highest(RSI, 21);
def lowRSI = Lowest(RSI, 21);
def RSIAverage = 100 * (RSI - lowRSI) / (highRSI - lowRSI);
def Net = Average(RSIAverage, 3);
def Delta = Average(Net, 5);
def Profile1 = highestall(high);
def Profile2 = lowestall(low);
def neg = if delta < delta[1] then lowestall(low) else Double.NaN;

#plot P1plot = profile1;
#plot P2plot = Profile2;
#Plot negplot = neg;

#### diazlaz

##### Well-known member
2019 Donor
VIP
Hi @Huffmac90,

interesting. how would you use It ?

see this helps:

Ruby:
``````def RSI = reference RSI(length = 13).RSI;
def highRSI = Highest(RSI, 21);
def lowRSI = Lowest(RSI, 21);
def RSIAverage = 100 * (RSI - lowRSI) / (highRSI - lowRSI);
def Net = Average(RSIAverage, 3);
def Delta = Average(Net, 5);
def Profile1 = highestall(high);
def Profile2 = lowestall(low);
def neg = if delta < delta[1] then lowestall(low) else Double.NaN;

def sState = if isNaN(neg) then 100 else -100;
AddVerticalLine(sState != sState[1] and sState == 100, profile2, Color.green, curve.SHORT_DASH);
AddVerticalLine(sState != sState[1] and sState == -100, profile1, Color.red, curve.SHORT_DASH);``````

#### john3

##### Active member
2019 Donor
@Huffmac90 Haven't seen this before. Interesting.

Did you come up with it on your own? If not, where have you seen it?

#### Huffmac90

##### Member
@john3 something I saw someone in a blog post ask about doing so I figured what the hell and gave it a shot. it's pretty easy to use for people that want to trade in time chunks.

## The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
• Exclusive indicators
• Proven strategies & setups
• Private Discord community
• Exclusive members-only content
• 1 full year of unlimited support

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?