Print Page | Close Window

RSI

Printed From: BullCharts Forum
Category: BullCharts
Forum Name: BullScript
Forum Discription: Technical discussion related specifically to the BullScript programming language.
URL: http://www.bullcharts.com.au/forum/forum_posts.asp?TID=563
Printed Date: 24 Apr 2025 at 12:50am
Software Version: Web Wiz Forums 9.69 - http://www.webwizforums.com


Topic: RSI
Posted By: jalna
Subject: RSI
Date Posted: 28 May 2009 at 9:47pm
Hi, Can anyone write the code so the RSI fills in with a solid colour, in the overbought and oversold areas. I noticed a lot of USA chartists do this and it can make it easier to see as the charts flip through quickly. Perhaps this will be too hard. Not sure what happens when the o'bought area is half completed. It would have to have completed I suppose



Replies:
Posted By: maximo
Date Posted: 30 May 2009 at 12:50am

Yes that's not too hard.  See if this is what you're after.  MML is showing half completion.

{ Full RSI formula with areafill }

n := input("Time period",14,1);

nb:= n*2-1; {=wilder's smoothing }

Su:=Ma(If(C-Ref(C,-1) > 0, C-Ref(C,-1), 0),nb,E);

Sd:=Ma(If(C-Ref(C,-1) < 0, Ref(C,-1) - C, 0),nb,E);

rs:=100-100/(1 + (Su/sd));

rs;

rs1:=if(rs>=70,rs,70);rs2:=70;

rs3:=if(rs<=30,rs,30);rs4:=30;

[color=red; linestyle=dotted]

70;

[color=lime green]

30;

[name=RSI Top Fill; linestyle=fill; color=blue]

rs1; rs2;

[name=RSI Low Fill; linestyle=fill; color=blue]

rs3; rs4;



Posted By: jalna
Date Posted: 30 May 2009 at 10:06am
Wonderful, yet again, thanks Maximo.
Its a great quick visual



Print Page | Close Window

Bulletin Board Software by Web Wiz Forums® version 9.69 - http://www.webwizforums.com
Copyright ©2001-2010 Web Wiz - http://www.webwiz.co.uk