Quote
Hello,
I want to be able to put ranges rather than horizontal lines on
indicator windows. e.g. rather than lines at say 70 and 30 on RSI I
would like to put 4 ranges as follows:
20 to 30 shaded red
55 to 65 shaded red
40 to 50 shaded blue
80 to 90 shaded blue
Is there a way of doing this. I am using Metastock 10.
Thanks.
Adrian
I want to be able to put ranges rather than horizontal lines on
indicator windows. e.g. rather than lines at say 70 and 30 on RSI I
would like to put 4 ranges as follows:
20 to 30 shaded red
55 to 65 shaded red
40 to 50 shaded blue
80 to 90 shaded blue
Is there a way of doing this. I am using Metastock 10.
Thanks.
Adrian
Adrian, MetaStock cannot shade specific areas with colours, but there is a trick that mimics area colouring (click on thumb pic below to enlarge chart):
RSI.png (28.13K)
Number of downloads: 83
And here is the indicator code:
========
RSI w/Bands
========
---8<----------------------------------
{ RSI with custom coloured bands v1.0
Band 1: 20 to 30 shaded Red
Band 2: 55 to 65 shaded Red
Band 3: 40 to 50 shaded Blue
Band 4: 80 to 90 shaded Blue
Copyright © 2007 Jose Silva.
The grant of this license is for personal use
only - no resale or repackaging allowed.
All code remains the property of Jose Silva.
http://www.metastocktools.com }
{ User input }
pds:=Input("RSI periods",1,2600,14);
{ Indicator }
ind:=RSI(pds);
{ Band boundaries }
b1a:=20;
b1b:=30;
b2a:=55;
b2b:=65;
b3a:=40;
b3b:=50;
b4a:=80;
b4b:=90;
{ Odd/Even bar pointers }
odd:=Mod(Cum(1),2)<>0;
even:=Mod(Cum(1),2)=0;
{ Bands }
band1a:=If(odd,b1a,b1b);
band1b:=If(even,b1a,b1b);
band2a:=If(odd,b2a,b2b);
band2b:=If(even,b2a,b2b);
band3a:=If(odd,b3a,b3b);
band3b:=If(even,b3a,b3b);
band4a:=If(odd,b4a,b4b);
band4b:=If(even,b4a,b4b);
{ Plot in own window.
Select plots and change colour to suit }
b1a;b1b; { <- Grey }
band1a;band1b; { <- Red }
b2a;b2b; { <- Grey }
band2a;band2b; { <- Red }
b3a;b3b; { <- Grey }
band3a;band3b; { <- Blue }
b4a;b4b; { <- Grey }
band4a;band4b; { <- Blue }
ind { <- Yellow }
---8<----------------------------------After plotting the above indicator, select each band's line/filler and change colour to suit and save setup as template.
Better still, download the setup file below (MetaStock v8.0 or higher), which will install the "RSI w/Bands" indicator and "RSI with Bands.mwt" template with colours already setup (as shown in the chart above):
RSIsetup.zip (65.27K)
Number of downloads: 42
A possibly useful refinement would be to add an Expert Advisor with vertical "trend" bands to indicate when the RSI falls into each custom band zone.
jose '-)

Sign In
Register
Help


MultiQuote