MetaStock™ Zone Forum & FAQ Artykuły Linki Elliott Waves EasyLanguage™ Zone

A B C D E F G H I J K L M N O P R S T U V W Y Z #

Rainbow Charts
1997 July TASC Trader's Tip

To create Rainbow Charts in MetaStock for Windows, open any chart, dropthe moving average indicator from the Indicator QuickList, and drop it in the same inner windows as the price bars. Enter two for the Periods and simple for the Method. Next plot a second moving average on the first moving average by dragging a moving average from the QuickListand dropping iton the first moving average (Note: The first moving average shouldturn light purple before you release the mouse button). If you dropped it correctly the Parameters dialog should say "Indicator" for the Price Field. Click OK to accept two periods and simple as the parameters.
Change the color of this moving average as desired. Now plot a thirdmoving average of the second moving average by repeating these steps. Continue this until you have ten moving averages. Choose Yes if MetaStock prompts you about plotting a duplicate indicator.

To save you time, I have created a template that allows you to bypassthese steps.
You can download this template directly off of the Equis web site at

Download this file to the Charts folder (e.g. C:\Equis\Mswin\Charts) in your MetaStock folder.
Open any chart and then click on your right mouse button while the pointer is located on the chart.
Choose Apply Template from the Chart Shortcut menu and choose the Rainbow Chart template.
You should now have a chart with ten different colored moving averages.

Next choose Indicator Builder from the Tools menu and enter the following formulas.

Rainbow Max



Rainbow Min




Rainbow Oscillator

100 *
(CLOSE - ((
Mov(Mov(Mov(C,2,S),2,S),2,S) +



Rainbow Band Lower

-100 * (Fml("Rainbow Max") - Fml("Rainbow Min")) / (HHV(C,10) - LLV(C,10))



Rainbow Band Upper

100 * (Fml("Rainbow Max") - Fml("Rainbow Min")) / (HHV(C,10) - LLV(C,10))


Plot the Rainbow Oscillator in a new inner window of your chart with the ten moving averages, by dropping the custom indicator from the QuickList on to the chart�sheading. Right click on the Rainbow Oscillator and choose properties, then change the Style to a histogram.

Now plot the Lower Rainbow Band and the Upper Rainbow Band in the sameinner windowas the Rainbow Oscillator. If the scaling dialog appears when plotting these indicators, choose "Merge with Scale on Right" Change the colors of the Upper and Lower Rainbow Bands as desired.

Now save this as a new template by choosing Save As from the File Menu and changing the File Type to template, so you can easily apply it to any chart.

Next, enter the following system by choosing System Tester from the Tools menu.
I've created an optimization variable for the Ubro constant so you can find the results that work best for you, but you can also replace the opt1 with 38 as mentioned in Widner's article.

Rainbow Chart System


Enter Long:
Cross( Fml( "Rainbow Uptrend Binary Wave" ),.5)

Close Long:
(Fml( "Rainbow Oscillator" ) < 0 AND Sum(ROC(Fml( "Rainbow Oscillator" ),1,$) < 0,2) =2 AND
Fml( "Upper Rainbow Band" ) < opt1) OR 200 * (C - Ref(C,-7))/(C + Ref(C,-7)) < -7


OPT1: Ubro
Min = 30.00 Max = 60.00 Step = 1.00

Allan J. McNichol, Equis International
800 882-3040, 801 265-8886
Source / From: TOP

Equis and MetaStock® and MetaStock Professional® are registered trademarks of Equis International. Achelis Binary Wave®, The DownLoader®,
Expert Advisor®, OptionScope®, Quotecenter® and Smart Charts® are trademarks of Equis International, a Thomson Reuters company.

TradeStation® Pro, TradeStation® 2000i, OptionStation®, SuperCharts®, PowerEditor® and EasyLanguage®
are registered trademarks of TradeStation Technologies, Inc. Other names and marks referred to are the property of their respective owners.

All information provided on this website is for educational purposes only. Trading involves risk, including possible loss of principal and other losses.

Ten i inne materiały na tej stronie zostały zamieszczone zostały jedynie w celach edukacyjnych, nie ponoszę żadnej odpowiedzialno¶ci za ich stosowanie.

Gra na giełdzie i rynkach walutowych (FOREX) niesie ze sob± ryzyko poważnych strat finansowych!