Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

count # of bars since RSI reached 3yr high Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
Macgyver9791
Posted : Monday, October 30, 2017 7:26:50 AM
Registered User
Joined: 10/27/2016
Posts: 9

Hi,

I'm struggling with the following:

I would like to count the # of bars where the RSI(14) on a monthly chart reached a 3 year high

I've tried it with trueinrow but I got stuck.

trueinrow(Max(RSI(14,36))-RSI(14),50) but that does not return what I'm looking for.

 

thx

JL

Bruce_L
Posted : Monday, October 30, 2017 9:22:58 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

Counting the number of bars in the most recent 50 bars where RSI reached a 3 year high on a monthly chart.

CountTrue(RSI14 = MAX(RSI14, 36), 50)

Is different than counting the number of bars since RSI reached a 3 year high on a monthly chart (assuming this happened at all during the most recent 50 bars).

SinceTrue(RSI14 = MAX(RSI14, 36), 50)

Note that you can change all instances of RSI to WRSI in the above formulas if you want to use the Wilder's smoothed version instead.

Which is different than counting the number of bars since RSI most recently reached its current 3 year high on a monthly chart.

IIF(RSI14.1.0 = MAX(RSI14, 36), 0, IIF(RSI14.1.1 = MAX(RSI14, 36), 1, IIF(RSI14.1.2 = MAX(RSI14, 36), 2, IIF(RSI14.1.3 = MAX(RSI14, 36), 3, IIF(RSI14.1.4 = MAX(RSI14, 36), 4, IIF(RSI14.1.5 = MAX(RSI14, 36), 5, IIF(RSI14.1.6 = MAX(RSI14, 36), 6, IIF(RSI14.1.7 = MAX(RSI14, 36), 7, IIF(RSI14.1.8 = MAX(RSI14, 36), 8, IIF(RSI14.1.9 = MAX(RSI14, 36), 9, IIF(RSI14.1.10 = MAX(RSI14, 36), 10, IIF(RSI14.1.11 = MAX(RSI14, 36), 11, IIF(RSI14.1.12 = MAX(RSI14, 36), 12, IIF(RSI14.1.13 = MAX(RSI14, 36), 13, IIF(RSI14.1.14 = MAX(RSI14, 36), 14, IIF(RSI14.1.15 = MAX(RSI14, 36), 15, IIF(RSI14.1.16 = MAX(RSI14, 36), 16, IIF(RSI14.1.17 = MAX(RSI14, 36), 17, IIF(RSI14.1.18 = MAX(RSI14, 36), 18, IIF(RSI14.1.19 = MAX(RSI14, 36), 19, IIF(RSI14.1.20 = MAX(RSI14, 36), 20, IIF(RSI14.1.21 = MAX(RSI14, 36), 21, IIF(RSI14.1.22 = MAX(RSI14, 36), 22, IIF(RSI14.1.23 = MAX(RSI14, 36), 23, IIF(RSI14.1.24 = MAX(RSI14, 36), 24, IIF(RSI14.1.25 = MAX(RSI14, 36), 25, IIF(RSI14.1.26 = MAX(RSI14, 36), 26, IIF(RSI14.1.27 = MAX(RSI14, 36), 27, IIF(RSI14.1.28 = MAX(RSI14, 36), 28, IIF(RSI14.1.29 = MAX(RSI14, 36), 29, IIF(RSI14.1.30 = MAX(RSI14, 36), 30, IIF(RSI14.1.31 = MAX(RSI14, 36), 31, IIF(RSI14.1.32 = MAX(RSI14, 36), 32, IIF(RSI14.1.33 = MAX(RSI14, 36), 33, IIF(RSI14.1.34 = MAX(RSI14, 36), 34, 35)))))))))))))))))))))))))))))))))))

Note that you would need to replace any instances of RSI14.1. with WRSI14. (without the 1.) when converting the last formula to its Wilder's smoothed version.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Macgyver9791
Posted : Monday, October 30, 2017 9:48:57 AM
Registered User
Joined: 10/27/2016
Posts: 9

Bruce

Your answers always bring light in my cloudy head!

Thank you!!!

Bruce_L
Posted : Monday, October 30, 2017 9:53:43 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

You're welcome.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Users browsing this topic
Guest-1

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.