Trying to add a indicator on a chart when RSI lvls are below 30

Im trying to write a script to put an indicator on the chart when the RSI levels hit 30. Cannot figure out how to do this. Any suggestions would be great!