Forgotten Your Password?
Connect with Facebook
Frequent Questions

Coding Forum Collaborate, receive help, or discuss coding related issues.

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, ...
Reply
1 1 Attachment(s)
 
LinkBack Thread Tools Display Modes

REQ:How to Add MA to Original RSI  

  #1  
Old 11-26-2009, 01:32 AM
itrader
 
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Re: REQ:How to Add MA to Original RSI  

  #2  
Old 11-26-2009, 01:37 AM
Tams's Avatar
Tams
does not like shills.
 
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Re: REQ:How to Add MA to Original RSI  

  #3  
Old 11-26-2009, 02:22 AM
itrader
 
Join Date: Oct 2007
Location: nontaburi
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Originally Posted by Tams View Post
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

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Re: REQ:How to Add MA to Original RSI  

  #4  
Old 11-26-2009, 10:27 AM
Tams's Avatar
Tams
does not like shills.
 
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Re: REQ:How to Add MA to Original RSI  

  #5  
Old 11-26-2009, 10:28 AM
Tams's Avatar
Tams
does not like shills.
 
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)


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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following User Says Thank You to Tams For This Useful Post:
aaa (12-19-2009)

Re: REQ:How to Add MA to Original RSI  

  #6  
Old 11-26-2009, 10:32 AM
Tams's Avatar
Tams
does not like shills.
 
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.


Attached Thumbnails
REQ:How to Add MA to Original RSI-smoothed-rsi.png  
__________________


You can't hope to be a man while acting like a girl.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Re: REQ:How to Add MA to Original RSI  

  #7  
Old 11-26-2009, 08:33 PM
itrader
 
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Re: REQ:How to Add MA to Original RSI  

  #8  
Old 12-13-2009, 12:44 AM
Tams's Avatar
Tams
does not like shills.
 
Join Date: Sep 2008
Location: Geelong
Posts: 2,279
Thanks: 1,282
Thanked 972 Times in 575 Posts
Originally Posted by itrader View Post
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


» »

» Invite Friends