Click here to Login





                                                   Plot differnt line style when RSI above or below 80/20 lines

  0

0
Dan Perez
2012-08-30 14:58:56


What is the formula to plot a different line style (dots) when the RSI line is above or below the 80/ 20 lines?

Thanks



QuantShare
2012-08-30 19:47:16

  1

Here is the formula:

a = rsi(14);
plot(a, "");
b = a < 20 or a > 80;
updatecolor(b, colorTransparent);
plot(a, "", colorRed, ChartLine, StyleDotted);



John Lyons
2012-09-02 19:39:50

  1

Thanks for this question and the reply.

I will be using this a lot.

Also, is it possible to color/fill the area just inside the plotted lines but only to the designated levels? (ie. above 80 and below 20 in thee previous example)



QuantShare
2012-09-03 11:37:28

  1

Here is an example:

a = rsi(14);
plot(a, "");
b = a < 20 or a > 80;
updatecolor(b, colorTransparent);

b = iff(b > 0, a, 0);
plot(b, "", colorRed|50, ChartLine, StyleDotted|StyleNoScale|StyleWidth0);
plot(a, "", colorRed, ChartLine, StyleDotted);



No more messages
0




Reply:

No html code. URLs turn into links automatically.

Type in the trading objects you want to include: - Add Objects
To add a trading object in your message, type in the object name, select it and then click on "Add Objects"










QuantShare

Trading Items
Ratio of Stocks above and below Bollinger Bands
Dynamic Zones RSI - Technical Indicator
Cultler RSI Indicator
Standard Error of the Estimate of a Regression Line
Slope of Support and Resistance Lines

How-to Lessons
How to plot support and resistance lines automatically
How to plot the number of stock tweets per day
How to plot arrows below/above candlesticks on a chart
How to plot a time-series that do not update the chart scale
How to plot a stock using different periods in the same chart

Related Forum Threads
Plot Threshold Lines
Plot text and variable in the same line
How to RSI
Positioning horizontal line
bollinger band & rsi formula

Blog Posts
How to Scan for Parallel Resistance and Support Lines
Real Time Alerts: Support and Resistance Lines Breakout
Custom Indicator: Accumulation Distribution Line
Watch your support and resistance lines
9 mistakes you should avoid when backtesting an end-of-day stock ...









QuantShare
Product
QuantShare
Features
Create an account
Affiliate Program
Support
Contact Us
Trading Forum
How-to Lessons
Manual
Company
About Us
Privacy
Terms of Use

Copyright © 2024 QuantShare.com
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
Google+
Follow us on Google+
RSS Trading Items



Trading financial instruments, including foreign exchange on margin, carries a high level of risk and is not suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to invest in financial instruments or foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with trading and seek advice from an independent financial advisor if you have any doubts.