Welcome to the Traders Laboratory Forums.
Coding Forum Collaborate, receive help, or discuss coding related issues.

Reply
Old 03-16-2010, 09:49 AM   #1

Join Date: Oct 2009
Location: london
Posts: 52
Ignore this user

Thanks: 2
Thanked 8 Times in 4 Posts

StochRSI

Does anyone have a working StochRSI indicator for MultiCharts or a working code?

I've been looking with little success, thanks.
lonew0lf is offline  
Reply With Quote
Old 03-16-2010, 10:20 AM   #2

Join Date: Feb 2008
Location: charleston
Posts: 63
Ignore this user

Thanks: 7
Thanked 21 Times in 16 Posts

Re: StochRSI

http://www.traderslaboratory.com/for...or-7323-2.html
statsign is offline  
Reply With Quote
The Following User Says Thank You to statsign For This Useful Post:
Tams (03-17-2010)
Old 03-16-2010, 10:37 AM   #3

Join Date: Feb 2008
Location: charleston
Posts: 63
Ignore this user

Thanks: 7
Thanked 21 Times in 16 Posts

Re: StochRSI

don't have multicharts and just thought - it may not have fastkcustomeasy function

if not post back and I will write it out for you
statsign is offline  
Reply With Quote
Old 03-17-2010, 07:35 AM   #4

Join Date: Oct 2009
Location: london
Posts: 52
Ignore this user

Thanks: 2
Thanked 8 Times in 4 Posts

Re: StochRSI

Here's the code that I was able to find:

input:

RSILength(9),
StochLength(18),
KLength(6),
DLength(3),
oversold(20),
overbought(80),
overscolor(white),
overbcolor(white);

Vars:
DToscK(0),
DToscD(0);

value1 = FastKCustomEasy(RSI(C, RSILength),StochLength);
DToscK = average(value1,KLength);
DToscD = average(DToscK,DLength);

plot1(DToscK,"%K" );
plot2(DToscD,"%D" );
plot3( overbought, "OverBot" ) ;
plot4( oversold, "OverSld" ) ;

condition1 = value1 crosses over OverSold ;
if condition1 then
Alert( "Indicator exiting oversold zone" )
else
begin
condition1 = value1 crosses under OverBought ;
if condition1 then
Alert( "Indicator exiting overbought zone" ) ;
end;
lonew0lf is offline  
Reply With Quote
The Following 2 Users Say Thank You to lonew0lf For This Useful Post:
Enalmada (08-13-2010), Tams (03-17-2010)
Old 03-17-2010, 09:06 AM   #5

Join Date: Feb 2008
Location: charleston
Posts: 63
Ignore this user

Thanks: 7
Thanked 21 Times in 16 Posts

Re: StochRSI

Code:
input:
RSILength(9),
StochLength(18),
KLength(6),
DLength(3),
oversold(20),
overbought(80),
overscolor(white),
overbcolor(white);

Vars:
DToscK(0),
DToscD(0);
 
value1 = RSI(C, RSILength);
value2 = highest(value1,StochLength);
value3 = lowest(value1,StochLength);
value4 = iff(C - value3 <> 0 and value2 - value3 <> 0,(C - value3)/(value2 - value3) * 100,0);
DToscK = average(value4,KLength);
DToscD = average(DToscK,DLength);

plot1(DToscK,"%K" );
plot2(DToscD,"%D" );
plot3( overbought, "OverBot" ) ;
plot4( oversold, "OverSld" ) ;

condition1 = value4 crosses over OverSold ;
if condition1 then
Alert( "Indicator exiting oversold zone" )
else
begin
condition1 = value4 crosses under OverBought ;
if condition1 then
Alert( "Indicator exiting overbought zone" ) ;
end;
statsign is offline  
Reply With Quote
The Following User Says Thank You to statsign For This Useful Post:
Tams (03-17-2010)
Old 03-17-2010, 10:59 AM   #6

Join Date: Oct 2009
Location: london
Posts: 52
Ignore this user

Thanks: 2
Thanked 8 Times in 4 Posts

Re: StochRSI

Statsign:

Is your code smoothing the indicator to get rid of noise?
Attached Thumbnails
StochRSI-stoch-rsi.jpg  
lonew0lf is offline  
Reply With Quote
Old 03-17-2010, 11:09 AM   #7

Join Date: Feb 2008
Location: charleston
Posts: 63
Ignore this user

Thanks: 7
Thanked 21 Times in 16 Posts

Re: StochRSI

no I made a mistake

Code:
input:
RSILength(9),
StochLength(18),
KLength(6),
DLength(3),
oversold(20),
overbought(80),
overscolor(white),
overbcolor(white);

Vars:
DToscK(0),
DToscD(0);
 
value1 = RSI(C, RSILength);
value2 = highest(value1,StochLength);
value3 = lowest(value1,StochLength);
value4 = iff(value1 - value3 <> 0 and value2 - value3 <> 0,(C - value3)/(value2 - value3) * 100,0);
DToscK = average(value4,KLength);
DToscD = average(DToscK,DLength);

plot1(DToscK,"%K" );
plot2(DToscD,"%D" );
plot3( overbought, "OverBot" ) ;
plot4( oversold, "OverSld" ) ;

condition1 = value4 crosses over OverSold ;
if condition1 then
Alert( "Indicator exiting oversold zone" )
else
begin
condition1 = value4 crosses under OverBought ;
if condition1 then
Alert( "Indicator exiting overbought zone" ) ;
end;
I put in close instead of RSI in the stochastic calc - fixed above

When you posted I thought you needed new code
statsign is offline  
Reply With Quote
Old 03-17-2010, 11:25 AM   #8

Join Date: Oct 2009
Location: london
Posts: 52
Ignore this user

Thanks: 2
Thanked 8 Times in 4 Posts

Re: StochRSI

Awesome, thanks for the follow-up code.
lonew0lf is offline  
Reply With Quote

Reply

Thread Tools
Display Modes Help Others By Rating This Thread
Help Others By Rating This Thread:


All times are GMT -4. The time now is 09:48 AM.
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
CS to VB integration by DeskLancer
©2006-2011 Traders Laboratory, All Rights Reserved.