Coding Forum Thread, REQ:How to Add MA to Original RSI in Trading Resources; Hi All,
I am using TradeStation 8.2 ,I need to add simple , Exp and Weihgted MA to original RSI, ...  | | | REQ:How to Add MA to Original RSI

11-26-2009, 01:32 AM
| | | | Join Date: Oct 2007 Location: nontaburi
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
| | Hi All,
I am using TradeStation 8.2 ,I need to add simple , Exp and Weihgted MA to original RSI, or other word,I need to have RSI with MA of its.since TS just have RSI one line only.
any expert pls kindly suggest me about this,thanks so much in advance.
Kindest regards,
itrader. | Re: REQ:How to Add MA to Original RSI

11-26-2009, 01:37 AM
| | | | Join Date: Sep 2008 Location: Geelong
Posts: 2,279
Thanks: 1,282
Thanked 972 Times in 575 Posts
| | can you post the code?
p.s. use the code tag to wrap the code. That's the # icon at the top of the reply window.
__________________ You can't hope to be a man while acting like a girl. | Re: REQ:How to Add MA to Original RSI

11-26-2009, 02:22 AM
| | | | Join Date: Oct 2007 Location: nontaburi
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
| |
Originally Posted by Tams can you post the code?
p.s. use the code tag to wrap the code. That's the # icon at the top of the reply window. | Firstly,thank you,Sir for your quick reply.
Here is the RSI code inputs:
Price( Close ),
Length( 14 ),
OverSold( 30 ),
OverBought( 70 ),
OverSColor( Cyan ),
OverBColor( Red ) ;
variables: MyRSI( 0 ) ;
MyRSI = RSI( Price, Length ) ;
Plot1( MyRSI, "RSI" ) ;
Plot2( OverBought, "OverBot" ) ;
Plot3( OverSold, "OverSld" ) ;
{ Color criteria }
if MyRSI > OverBought then
SetPlotColor( 1, OverBColor )
else if MyRSI < OverSold then
SetPlotColor( 1, OverSColor ) ;
{ Alert criteria }
if MyRSI crosses over OverSold then
Alert( "Indicator exiting oversold zone" )
else if MyRSI crosses under OverBought then
Alert( "Indicator exiting overbought zone" ) ;
{ ** Copyright (c) 1991-2003 TradeStation Technologies, Inc. All rights reserved. **
** TradeStation reserves the right to modify or overwrite this analysis technique
with each release. ** }
| You 're very helpful,Thanks agin.
itrader. | Re: REQ:How to Add MA to Original RSI

11-26-2009, 10:27 AM
| | | | Join Date: Sep 2008 Location: Geelong
Posts: 2,279
Thanks: 1,282
Thanked 972 Times in 575 Posts
| | if you read the code line by line, you will see this: MyRSI = RSI( Price, Length ) ;
the RSI is calculated, and the data is saved in the variable MyRSI.
to average out the data, all you have to do is add: Smoothed.RSI = average( MyRSI , Smooth.length);
same deal for weighted average or exponential average... or whatever data modifying calculation you want to make.
.
__________________ You can't hope to be a man while acting like a girl.
Last edited by Tams; 11-26-2009 at 10:36 AM.
| Re: REQ:How to Add MA to Original RSI

11-26-2009, 10:28 AM
| | | | Join Date: Sep 2008 Location: Geelong
Posts: 2,279
Thanks: 1,282
Thanked 972 Times in 575 Posts
| | Here's the modified code.
note the added input, variables, calculation, and plot statements.
(you should save this code under a different name, so that you do not ruin the original RSI code) // Smoothed RSI
// modification by TAMS
// date: 20091126
//
inputs:
Price( Close ),
Length( 14 ),
Smooth.Length( 3 ), { <--- NEW }
OverSold( 30 ),
OverBought( 70 ),
OverSColor( Cyan ),
OverBColor( Red ) ;
variables:
MyRSI( 0 ) ,
Smoothed.RSI( 0 ) ; { <-- NEW }
MyRSI = RSI( Price, Length ) ;
Smoothed.RSI = Average( MyRSI, Smooth.length); { <-- NEW }
Plot1( MyRSI, "RSI" ) ;
Plot11( Smoothed.RSI, "Smoothed.RSI" ) ; { <-- NEW }
Plot2( OverBought, "OverBot" ) ;
Plot3( OverSold, "OverSld" ) ;
{ Color criteria }
if MyRSI > OverBought then
SetPlotColor( 1, OverBColor )
else if MyRSI < OverSold then
SetPlotColor( 1, OverSColor ) ;
{ Alert criteria }
if MyRSI crosses over OverSold then
Alert( "Indicator exiting oversold zone" )
else if MyRSI crosses under OverBought then
Alert( "Indicator exiting overbought zone" ) ;
{ ** Copyright (c) 1991-2003 TradeStation Technologies, Inc. All rights reserved. **
** TradeStation reserves the right to modify or overwrite this analysis technique
with each release. ** }
|
__________________ You can't hope to be a man while acting like a girl.
Last edited by Tams; 11-26-2009 at 10:38 AM.
| | The Following User Says Thank You to Tams For This Useful Post: | | Re: REQ:How to Add MA to Original RSI

11-26-2009, 10:32 AM
| | | | Join Date: Sep 2008 Location: Geelong
Posts: 2,279
Thanks: 1,282
Thanked 972 Times in 575 Posts
| | here's how it looks:
if you don't want to see the original RSI plot,
you can delete it from the code,
or simply set it to invisible on the chart. 
__________________ You can't hope to be a man while acting like a girl. | Re: REQ:How to Add MA to Original RSI

11-26-2009, 08:33 PM
| | | | Join Date: Oct 2007 Location: nontaburi
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
| | Tams,You 're the EXPERT and VERY HELPFUL.I don't have any word to say,except THANK YOU VERY MUCH.This is all i need.
Have a good trade
itrader. | Re: REQ:How to Add MA to Original RSI

12-13-2009, 12:44 AM
| | | | Join Date: Sep 2008 Location: Geelong
Posts: 2,279
Thanks: 1,282
Thanked 972 Times in 575 Posts
| |
Originally Posted by itrader Tams,You 're the EXPERT and VERY HELPFUL.I don't have any word to say,except THANK YOU VERY MUCH.This is all i need.
Have a good trade
itrader. |
You are welcome...
You can also check out this variation.
It is on Stochastic... the idea can be applied to RSI, or any oscillating indicator. Tidal Wave http://www.traderslaboratory.com/for...wave-5666.html 
156
__________________ You can't hope to be a man while acting like a girl.
Last edited by Tams; 12-13-2009 at 12:57 AM.
|  | |
Similar Threads | | Thread | Thread Starter | Forum | Replies | Last Post | | Wyckoff: The Original Course | DbPhoenix | The Wyckoff Forum | 0 | 06-20-2009 10:53 AM | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Thread Tools | | | | Display Modes | Linear Mode |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | | |