I have one indicator that gives me one alert when I have one engulfing candle in a range of RSI values, but for some reason the indicator is not reading the RSI values and some of the alerts are not being given exactly when the candle closes.
Here is the code
double RSI= iRSI(_Symbol,_Period,RSIperiod,AppliedPrice,Shift);
if(open2>open1 && open2<close1 && close2<close1 && bar1sizeBULL>(bar2sizeBULL*2) && RSI>MinValBuy && RSI<MaxValBuy && NewBar())
Alert(Symbol()+" TF:"+string(Period())+" bullish: "+string(NormalizeDouble(Ask,Digits)));
if(open2<open1 && open2>close1 && close2>close1 && bar1sizeBEAR>(bar2sizeBEAR*2) && RSI<MinValSell && RSI>MaxValSell && NewBar())
Alert(Symbol()+" TF:"+string(Period())+" bearish: "+string(NormalizeDouble(Ask,Digits)));
What is weong with this code?
Thanks in advance.
Sorry about that. Is that ok?
Why do you think that it is not reading the RSI values?
I have no idea it was suppose to be just numbers that Ichoose in the inputs. Is there any other way or a correct way to do it?
it gives me the alerts too much oversold I need to filter it
Please enable the necessary setting in your browser, otherwise you will not be able to log in.