Alert when RSI and StochRSI cross oversold line


0
0

Hi Pete,

How can I create an alert (with a green arrow) when StochRSI crosses above line 25, and RSI is higher than the old RSI within 1 bar. And also the Heiken Ashi candle change colors

Thank you so much

Marked as spam
Posted by (Questions: 5, Answers: 5)
Asked on December 10, 2018 3:54 pm
600 views
0

“higher than the old RSI”??? You will need to explain that. For the Heiken-Ashi portion, we already have that covered in a previous post on the forum. Use the search box to locate items of interest before posting a new question. Thanks!

( at December 11, 2018 8:38 am)
0

Hahn,
It means that RSI is increasing (ex: from 30 -> 40) and StochRSI crosses the line 25. I want to set up alert for that and also when Heiken Ashi candle change color.
Thank you so much for your help

( at December 11, 2018 1:27 pm)
0
Private answer

Ok, as I already mentioned in my previous comment the Heikin-Ashi portion has already been published in the forum. You will gain so much more from this resource if you take the time to search and find solutions. Trust me.

Here is link to that post: https://www.hahn-tech.com/ans/alert-setting-on-heikin-ashi-candles/

Here is the code for the RSI/StochRSI portion. Screenshot attached shows the result.

declare lower;
#---------- StochRSI Inputs
input RSI_length = 14;
input over_bought = 80;
input over_sold = 20;
input RSI_average_type = AverageType.WILDERS;
input RSI_price = close;
input KPeriod = 14;
input DPeriod = 3;
input slowing_period = 1;
input stochRSIaverageType = AverageType.SIMPLE;
#---------- StochRSI Section
plot rsi = RSI(price = RSI_price, length = RSI_length, averageType = RSI_average_type);
plot fullK = StochasticFull(over_bought, over_sold, KPeriod, DPeriod, rsi, rsi, rsi, slowing_period, stochRSIaverageType).fullK;
plot fullD = StochasticFull(over_bought, over_sold, KPeriod, DPeriod, rsi, rsi, rsi, slowing_period, stochRSIaverageType).fullD;
#---------- Conditions
def stochRSIcondition = fullK[1] < 25 and fullK > 25;
def rsiCondition = rsi > rsi[1];
#---------- Signal Section
plot signal = if stochRSIcondition and rsiCondition then fullK else Double.NaN;
signal.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
signal.SetDefaultColor(Color.CYAN);
signal.SetLineWeight(3);
#---------- Alerts
Alert(signal, "StochRSI/RSI Trigger", Alert.BAR, Sound.RING);

Attachments:
Marked as spam
Posted by (Questions: 37, Answers: 4118)
Answered on December 12, 2018 8:49 am