Program 71 | Multiple timeframe averages analysis

Analysis of multiple time frame averages

The objective of the program is to change the color and thickness of the simple average of price to indicate a bearish, or bullish bias or congestion based on analysis of several time series moving averages and their position relative to each other. The program is unprotected and available for immediate download so that you can modify it to your own needs.

Program 71 uses the Price Series Provider class to calculate and plot simple moving averages for 6 different user specified time series. The intervals for the time series are specified in minutes, for example program 71’s defaults are: 15 minutes,  30 minutes, 60 minutes, 120 minutes, 240 minutes, and 480 minutes.  Simple moving averages are calculated for the symbol on the chart (I have used a 5 minute interval for most of the examples on this page) as well as for the time series and these are plotted on the chart.

Program 71 applied to a 5 minute @ES chart. The stepped lines are averages for different time intervals

The moving average lines are plotted on the chart and so their style and color can be modified in the Format Analysis technique settings. The color and thickness of the moving average of the price is controlled by analysis within the program. The average lines can be analysed in two ways, based on a user input:

Technique 1:  Analyse the price series moving averages to see if the longer or shorter averages tend to be the highest (or lowest)

A strong downtrend starts at about 0130 indicated by the thicker red line and followed by thin line.

With technique 1 the program analyses the price series moving averages to see where the price average ranks in relation to the PSP simple moving averages (SMAs). If the price moving average is the highest or within the top 4 averages and the slope of the price line over 4 bars is greater than zero, this is seen as a bullish indication. If the price SMA are lowest or within the bottom 4 averages, and the slope of the price line over 4 bars is less than zero, this is seen as a bearish indication. The line is drawn thicker if the price moving average is nearer the extremes.

The color of the price line is based on a 2 period simple moving average of the price. If the slope is positive the line is plotted with a color defined by user input BullCol, if the slope is negative, the line is plotted as defined by BearCol.

A narrowing of the averages triggers the thicker line with Congescol (in this case, black);

If the distance between the moving averages for the shortest price intervals is narrowing more than user input Narrowing – 1 (i.e. the current smallest distance is less than that for the previous Narrowing – 1 bars) the thickness of the line is set to 6 and the color to user input: CongesCol.

Technique 2: Counting the last change in the price and price series providers

Technique 2 shows a period of relatively flat price movement indicated by some black line, followed by a bullish move, indicated by the thicker green line. Followed again by price indecision (with characteristic black lines) and then a bearish move (thickening red lines)

With technique 2 the program increments a bear counter such if the last change (compared to the previous bar) for for the price or each of the PSPs was up, the bear counter is incremented by 1. For example, if the last change in price ( Close – Close[1]) was positive, the bull counter would be incremented by 1. If in addition to price of one of the PSPs was greater than the previous PSP value, the bull counter would be incremented by another 1 etc.

The color of the price line is based on a 2 period simple moving average of the price. If the slope is positive the line is plotted with a color defined by user input BullCol, if the slope is negative, the line is plotted as defined by BearCol.

The thickness of the price line is determined by the value of the bull counter.

Similarly, the bear counter is incremented by one when the price this bar is LESS than the price last bar (and the same for the PSPs).

As with technique 1, if the distance between the moving averages for the shortest price intervals is narrowing more than user input Narrowing – 1 (i.e. the current smallest distance is less than that for the previous Narrowing – 1 bars) the thickness of the line is set to 6 and the color to user input: CongesCol.

User inputs

int Technique( 1 ), // 1 = highest average or lowest average, 2 = averages rising/falling
int MALen( 3 ), // Length of price and price series provider moving averages

int BullCol( Green ), // Colors price average (plot1) deemed to be bullish according to the specific technique
int BearCol( Red ), // Colors price average (plot1) deemed to be bearish according to the specific technique
int CongesCol( Black ), // Congestion color

int Interval1( 15 ), // Interval in minutes for the first time period (should be shortest time frame)
int Interval2( 30 ), // Interval in minutes for the second time period (should be second shortest time frame)
int Interval3( 60 ), // Interval in minutes for the third time period (should be third shortest time frame)
int Interval4( 120 ), // Interval in minutes for the fourth time period (should be fourth shortest time frame)
int Interval5( 240 ), // Interval in minutes for the fifth time period (should be fifth shortest time frame)
int Interval6( 480 ), // Interval in minutes for the sixth time period (should be the longest time frame)

int Narrowing( 5 ); // How many bars back to look for ‘narrowing.’ See NarrowRge method below.

Programming techniques used in this program:

  • Price series provider (PSP) creation method (useful when you wish to create a large number of price series providers)
  • Automatically create PSP objects with their first date set to the datetime of the first bar on the chart
  • Automaticaally detect whether the chart is using local or exchange time
  • Method to gauge narrowing of average bands
  • Create and sort a two dimensional array
  • Modify plot style (thickness) and color

Program download

The UNPROTECTED indicator (i.e. the TradeStation EasyLanguage is fully functional and you can see the source code) is available for for IMMEDIATE download for $49- by clicking the ‘add to cart’ button.

After download the program can be opened, you will be able to see the program code and modify it. After purchase you will be redirected to a download page, so don’t close the browser.

If you are a Gold Pass member make sure you enter the special coupon code to get 20% discount off these prices. Also, be sure to watch the bonus Gold Pass video below.

Program 71 video

Gold Pass area

This content is for members only.

Disclaimer The information, materials, products and services on this Web site are made available subject to the following terms and conditions. Markplex Corporation reserves the right to change these terms and conditions at its sole discretion. This Web site and any downloads, videos, tutorials, programs and information contained herein is presented solely for educational, informational, and/or entertainment use and under no circumstances should be used for actual trading. We at Markplex Corporation are not Broker/Dealers, Financial Advisers or Registered Analysts. No offer or solicitation to buy or sell securities, securities derivatives, futures products or off-exchange foreign currency (forex) transactions of any kind, or any type of trading or investment advice, recommendation or strategy, is made, given or in any manner endorsed by Markplex Corporation. You are fully responsible for any investment or trading decisions you make. Futures and options trading has a large potential risk. You must be aware of the risks and be willing to accept them in order to invest in the futures and options markets. This Web site is neither a solicitation nor an offer to buy and/or sell futures or options. No representation is being made that any account will or is likely to achieve profits or losses similar to those discussed on this Web site. Past performance, whether actual or indicated by historical tests of strategies, is no guarantee of future performance or success. No warranties of profitability are being made or given. There is a possibility that you may sustain a loss equal to or greater than your entire investment regardless of which asset class you trade (equities, options futures or forex); therefore, you should not invest or risk money that you cannot afford to lose. CFTC RULE 4.41 - Hypothetical or simulated performance results have certain inherent limitations. Unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not actually been executed, the results may have under- or over-compensated for the impact, if any, of certain market factors, such as lack of liquidity. Simulated trading programs in general are also subject to the fact that they are designed with the benefit of hindsight. No representation is being made that any account will or is likely to achieve profits or losses similar to those shown. Screen shots on this site are examples and are not meant to imply that any of the programs or tutorials available on this Web site will generate profitable trades. EasyLanguage or PowerLanguage trading strategies, signals, studies, indicators, showme studies, paintbar studies, probabilitymap studies, activitybar studies, functions (and parts thereof) and associated techniques referred to, included in or attached to this tutorial or program description are examples only, and have been included solely for educational, informational, and entertainment use. Markplex Corporation does not recommend that you use any such trading strategies, signals, studies, indicators, showme studies, paintbar studies, probabilitymap studies, activitybar studies, functions (or any parts thereof) or techniques. The use of any such trading strategies, signals, studies, indicators, showme studies, paintbar studies, probabilitymap studies, activitybar studies, functions and techniques does not guarantee that you will make profits, increase profits, or minimize losses. Markplex Corporation assumes no liability for any damages, direct or otherwise, resulting from the use of this information and/or program(s) described, and no warranty is made regarding its accuracy or completeness. Use of this Web site including the information, tutorials and/or programs included on it is at your own risk. You shall indemnify and hold Markplex Corporation harmless from any and all liability, loss, trading losses, costs, damage, or expense, including attorneys' fees you or third party may suffer (other than damage to your tangible property or injuries to employees occurring during the course of work) as a result of claims, demands, costs, or judgments arising out of third party and any other claims based on Markplex Corporation's performance, including, but not limited to losses resulting from the use of Markplex Corporation developed software, programs, web sites, tutorials, or the TradeStation charting and/or trading platform. Any testimonials on this Web site may not be representative of the experience of other clients and are not indicative of future results or success.
This Web site contains or may contain references and links to other companies and/or their Web sites, none of which is under the control of Markplex Corporation. Markplex Corporation makes no representations, warranties or endorsements whatsoever about any other Web sites to which you may have access through the Markplex Corporation Web site, or any products or services of those other companies, even if the products or services of those other companies or their Web sites are described or offered on the Markplex Corporation Web site or integrated with Markplex Corporation's products or services. TradeStation®, EasyLanguage® and PowerEditor® are registered trademarks of TradeStation Technologies, Inc. Other brand and product names which appear on this site are the trademarks or service marks of their respective owners, including: Microsoft® is a registered trademark in the United States Microsoft®Excel® is a registered trademark of Microsoft® Neither TradeStation Technologies nor any of its affiliates has reviewed, certified, endorsed, approved, disapproved or recommended, and neither does or will review, certify, endorse, approve, disapprove or recommend, any product or service that offers training, education or consulting regarding the use of EasyLanguage.

By continuing to use and navigate our sites, services, applications, tools or messaging, you are agreeing to our Terms and Conditions and the use of cookies, web beacons and similar technologies as described in our Privacy Policy and Privacy Policy on the use of cookies.