Forums › ProRealTime English forum › ProBuilder support › Checking conditions in an indicator › Reply To: Checking conditions in an indicator
05/09/2019 at 3:05 PM
#98087
It seems that from barindex = 0 to 14 the RSI(14) value is undefined. Just do like this:
1 2 3 4 5 6 7 8 |
IF BarIndex < 15 THEN MyCond = 0 ENDIF MyRsi = Rsi[14](close) IF MyCond = 0 THEN MyCond = MyRsi CROSSES OVER 50 ENDIF RETURN MyCond |