RSI Momentum

Hi, I’m having difficulty writing a script for RSI stayed above 50 and also had a high above 70 in the last 100 days. Thanks

Hi Luke,

How far did you get? You will need a combination of TIMESINCESIGNAL and HIGHESTHIGH functions.

To rephrase your question, how long it been since the RSI(14) has been below 50? This will give you the value - to make it a boolean true/false condition for a scan add the condition > 100 to the end.


What is the highest RSI(14) value over the last 100 days? Again to make it a valid scan true/false condition add the > 70 condition to the following:


Without the conditions you can see the values in a watchlist, with values since RSI below 50 > 100 and highest RSI > 70 coloured green. In this example of the ASX300, AVN has had the longest period with the RSI>50 at 50 days. Save and open the workbook attached to load on your system.

RSI-Counts.owb (137 KB)

Hi Luke, and everyone else reading this post,

I note that Darren has attempted to respond to your request, but in doing so he has had to make some assumptions as to what you are looking for. Thus the following is directed to all who are seeking scripting assistance:

When seeking assistance on a script, please help yourself and those of us that are inclined to respond by ALWAYS posting your attempt at the script. Include in your script comments describing what the follow line(s) of code is a attempting to achieve. The more comments the better. That way we have a chance of understanding exactly what it is you are trying to achieve, and you, and others, will learn by the advice subsequently provided. Also, your attempt may only need minor changes and so engenders a more speedy response (like one I addressed the other day that only need commas in numbers changed to periods). The more detail provided as to what you are trying to do makes is much easier to provide assistance, so also include, when possible, a chart annotated with appropriate comments that shows the undesired outcome of your unsuccessful attempt at scripting.

Note, I am not an employee of Optuma, but one who is willing to assist those that demonstrate that they have tried something and are not just asking for some-one else to do all the work in creating the script desired.