Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Stochrsi Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
Sunbird
Posted : Wednesday, January 5, 2005 6:52:56 PM
Registered User
Joined: 10/7/2004
Posts: 45
How do I write a formula for stochrsi?

Sunbird
Craig_S
Posted : Wednesday, January 5, 2005 9:00:16 PM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
For a 10 period Stochrsi using an RSI of 18 and 3 you would use this PCF:

(RSI18.3 - MIN(RSI18.3,10))/(MAX(RSI18.3,10) - MIN(RSI18.3,10))

For a different RSI or period, change the numbers accordingly. You can plot this as a custom indicator or use it in an EasyScan.

- Craig
Here to Help!
tbf
Posted : Thursday, August 1, 2013 5:08:17 AM
Registered User
Joined: 7/7/2013
Posts: 10

Hi Trainer,  For Stochastic RSI 9,9 %K1, the PCF should be
(RSI9.9 - MIN(RSI19.9,1))/(MAX(RSI9.9,1) - MIN(RSI9.9,1)).  Is this correct? Thanks.

StockGuy
Posted : Friday, August 2, 2013 11:45:28 AM

Administration

Joined: 9/30/2004
Posts: 9,187

%K is just the smoothing of the stochastic line so if it is 1 then it doesn't need to be in the calculation at all.

Assuming your RSI parameters are period 9,smoothing 1 you would use...

(RSI9.1 - MIN(RSI9.1,9))/(MAX(RSI9.1,9) - MIN(RSI9.1,9))

This is a StochRSI for RSI9.1 and a stochastics period of 9.
 

tbf
Posted : Tuesday, August 6, 2013 9:26:19 AM
Registered User
Joined: 7/7/2013
Posts: 10

Thanks StockGuy.

Mo.Trader
Posted : Tuesday, August 25, 2015 11:51:22 PM
Registered User
Joined: 1/3/2014
Posts: 36

for

(RSI18.3 - MIN(RSI18.3,10))/(MAX(RSI18.3,10) - MIN(RSI18.3,10))

 

Would the slope be 

((RSI18.3 - MIN(RSI18.3,10))/(MAX(RSI18.3,10) - MIN(RSI18.3,10)) ) -

((RSI18.3.1 - MIN(RSI18.3.1,10))/(MAX(RSI18.3.1,10) - MIN(RSI18.3.1,10)) )

 

or

 

((RSI18.3 - MIN(RSI18.3,10))/(MAX(RSI18.3,10) - MIN(RSI18.3,10)) ) -

((RSI18.3 - MIN(RSI18.3,10.1))/(MAX(RSI18.3,10.1) - MIN(RSI18.3,10.1)) )

 

Mo.Trader
Posted : Wednesday, August 26, 2015 12:11:08 AM
Registered User
Joined: 1/3/2014
Posts: 36

for a Full Stochastic 20,5,4  with a RSI of 14,  how would the Stochastic RSI be written ?

thanks

steve

Bruce_L
Posted : Monday, August 31, 2015 11:14:58 AM


Worden Trainer

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

The correct slope formula should be the first of the two options you provided in your first question.

The Full Stochastic 20,5 %K of a 14 period plain RSI can be written as follows.

100 * ((RSI14 - MIN(RSI14,20)) / (MAX(RSI14,20) - MIN(RSI14,20)) + (RSI14.1.1 - MIN(RSI14.1.1,20)) / (MAX(RSI14.1.1,20) - MIN(RSI14.1.1,20)) + (RSI14.1.2 - MIN(RSI14.1.2,20)) / (MAX(RSI14.1.2,20) - MIN(RSI14.1.2,20)) + (RSI14.1.3 - MIN(RSI14.1.3,20)) / (MAX(RSI14.1.3,20) - MIN(RSI14.1.3,20)) + (RSI14.1.4 - MIN(RSI14.1.4,20)) / (MAX(RSI14.1.4,20) - MIN(RSI14.1.4,20))) / 5

The Full Stochastic 20,5,4 %D of a 14 period plain RSI can be written as follows.

100 * ((RSI14 - MIN(RSI14,20)) / (MAX(RSI14,20) - MIN(RSI14,20)) + 2 * (RSI14.1.1 - MIN(RSI14.1.1,20)) / (MAX(RSI14.1.1,20) - MIN(RSI14.1.1,20)) + 3 * (RSI14.1.2 - MIN(RSI14.1.2,20)) / (MAX(RSI14.1.2,20) - MIN(RSI14.1.2,20)) + 4 * (RSI14.1.3 - MIN(RSI14.1.3,20)) / (MAX(RSI14.1.3,20) - MIN(RSI14.1.3,20)) + 4 * (RSI14.1.4 - MIN(RSI14.1.4,20)) / (MAX(RSI14.1.4,20) - MIN(RSI14.1.4,20)) + 3 * (RSI14.1.5 - MIN(RSI14.1.5,20)) / (MAX(RSI14.1.5,20) - MIN(RSI14.1.5,20)) + 2 * (RSI14.1.6 - MIN(RSI14.1.6,20)) / (MAX(RSI14.1.6,20) - MIN(RSI14.1.6,20)) + (RSI14.1.7 - MIN(RSI14.1.7,20)) / (MAX(RSI14.1.7,20) - MIN(RSI14.1.7,20))) / 20

Note that this is not based on a Wilder's smoothed RSI. There isn't a way to create Indicator Formulas for Wilder's smoothed versions which are short and fast enough to be practical or post in the forums.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Aces4Me
Posted : Tuesday, September 6, 2016 11:12:06 AM
Registered User
Joined: 4/30/2015
Posts: 197

Can you provide the Stochastic RSI for 10 10 2 and again can i take that formula and create a true false statement i.e.  (srsi formula) > 98 or (sris formula) < 2

 

Thank Again

Bruce_L
Posted : Wednesday, September 7, 2016 9:34:24 AM


Worden Trainer

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

The full stochastic 10,2 %K of a 10 period plain RSI can be written as follows.

100 * ((RSI10 - MIN(RSI10,10)) / (MAX(RSI10,10) - MIN(RSI10,10)) + (RSI10.1.1 - MIN(RSI10.1.1,10)) / (MAX(RSI10.1.1,10))) / 2

You could write your Condition Formula as follows.

100 * ((RSI10 - MIN(RSI10,10)) / (MAX(RSI10,10) - MIN(RSI10,10)) + (RSI10.1.1 - MIN(RSI10.1.1,10)) / (MAX(RSI10.1.1,10))) / 2 > 98 OR 100 * ((RSI10 - MIN(RSI10,10)) / (MAX(RSI10,10) - MIN(RSI10,10)) + (RSI10.1.1 - MIN(RSI10.1.1,10)) / (MAX(RSI10.1.1,10))) / 2 < 2

Or as the shorter version below.

ABS(100 * ((RSI10 - MIN(RSI10,10)) / (MAX(RSI10,10) - MIN(RSI10,10)) + (RSI10.1.1 - MIN(RSI10.1.1,10)) / (MAX(RSI10.1.1,10))) / 2 - 50) > 48



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Aces4Me
Posted : Wednesday, September 7, 2016 1:24:24 PM
Registered User
Joined: 4/30/2015
Posts: 197

The Money Flow 3 period was really close but the stochastic does not plot at all the same as the Stochastic RSI indicator with 10 10 2 settings ?

 

Bruce_L
Posted : Wednesday, September 7, 2016 1:46:34 PM


Worden Trainer

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

It uses the plain RSI without Wilder's smoothing. There isn't a way to create the formula using a StochRSI based on a Wilder's smoothed RSI.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Aces4Me
Posted : Monday, September 12, 2016 10:01:42 PM
Registered User
Joined: 4/30/2015
Posts: 197

shorter version below.

ABS(100 * ((RSI10 - MIN(RSI10,10)) / (MAX(RSI10,10) - MIN(RSI10,10)) + (RSI10.1.1 - MIN(RSI10.1.1,10)) / (MAX(RSI10.1.1,10))) / 2 - 50) > 48

IF THE ABOVE IS  < 2

what is the shorter version for > 98

Bruce_L
Posted : Tuesday, September 13, 2016 10:17:55 AM


Worden Trainer

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

The shorter version is designed to to test for both > 98 and < 2. That is what the ABS() and -50 portions of the formula do. It is designed to eliminate the OR in the longer formula.

> 98 on its own would just be:

100 * ((RSI10 - MIN(RSI10,10)) / (MAX(RSI10,10) - MIN(RSI10,10)) + (RSI10.1.1 - MIN(RSI10.1.1,10)) / (MAX(RSI10.1.1,10))) / 2 > 98

And < 2 on its own would just be:

100 * ((RSI10 - MIN(RSI10,10)) / (MAX(RSI10,10) - MIN(RSI10,10)) + (RSI10.1.1 - MIN(RSI10.1.1,10)) / (MAX(RSI10.1.1,10))) / 2 < 2



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Aces4Me
Posted : Friday, September 30, 2016 4:08:41 PM
Registered User
Joined: 4/30/2015
Posts: 197

QUOTE (Bruce_L)

It uses the plain RSI without Wilder's smoothing. There isn't a way to create the formula using a StochRSI based on a Wilder's smoothed RSI.

i still don't quite under stand how the Stochastic RSI Indicator can be plotted but not calculated

Bruce_L
Posted : Friday, September 30, 2016 4:16:24 PM


Worden Trainer

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

The program doesn't normally use the PCFs to plot indicators. The built in indicators are written in Visual Basic within the program itself. The indicators are calculated in order to plot them, but that doesn't mean the indicators can be re-created in a formula.

If the required syntax isn't available in the Personal Criteria Formula Language to write a reasonably short and fast version, then you aren't going to be able to create a formula for it.



-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.