MotiveWave Docs
MotiveWave.com
  • User Guide
    • Welcome
    • Quick Start Guide
      • Getting Started
      • Installation
      • Customization Options
      • Advanced Features
      • Troubleshooting and Support
      • Next Steps
    • Console Overview
      • Preferences
      • Changing the Look and Feel
      • Desktops
      • Quote Sheets
      • Backup and Restore
      • Repository
      • Email Configuration
      • Docking Framework Guide
        • Introduction
        • Stations
        • Pages
        • Layouts
        • Customization
    • Accounts Panel
      • Simulated Account
      • Commissions
    • Alerts
    • Charts
      • Settings
      • Chart Spacing
      • Bar Sizes
      • Importing Data
      • Exporting Data
      • Birds Eye View
      • Cursor Data
      • Depth Of Market
      • Chart Labels
      • News
      • Watermark
      • Scaling
      • Analyses
      • Ratios
      • Time and Price Guides
      • Percent Change Charts
      • Software Development Kit
      • Lock Studies
      • Lock Scroll
      • Study Templates
      • Linking Charts
      • Working With Chart Windows
      • Ticker Tape
      • Chart Trading
      • Data Export Groups
      • Analyses Guide
        • Introduction
        • Managing Analyses
        • Sharing Analyses
    • Components
    • Depth Of Market
    • Elliott Wave
    • Hurst Cycles
      • Introduction
      • Study Overview
      • Using the Hurst Cycle Study
    • Instruments
      • Custom Instruments
    • Option Chain
    • Order Flow
      • Introduction
      • Time Price Opportunity (TPO) Study
      • Volume Imprint
      • Depth of Market
      • Time and Sales
      • Delta Volume
      • Cumulative Delta
      • Bid/Ask Volume
      • Speed of Tape
      • DOM Power
      • Order Heatmap
      • Big Trades
      • Speed Gauges
      • Components
    • Pages
    • Preferences
      • General
      • Theme
      • Chart
      • Toolbar
      • Sounds
      • Ratios
      • Elliott Wave
      • Harmonics
      • Historical Data
      • Orders
      • Alerts
      • Email
      • Trade History
      • Buy/Sell
    • Replay Mode
    • Scanner
      • Scanner
      • Creating a Scan
      • Executing a Scan
      • Editing a Scan
      • Elliott Wave Scanner
      • Harmonic Scanner
      • Study Scanner
    • SDK Programming Guide
      • Preface
      • Change History
      • Introduction
      • Fundamental Classes
      • Overlay Example
      • Study Plot Example
      • Drawing Figures
      • Signals
      • Tick Data
      • Strategies
      • Logging
      • Internationalization
      • Deployment
      • Environment Setup
    • Shortcuts
    • Strategies & Backtest
      • Strategy Back Testing
      • Creating a Strategy Analysis
      • Strategy Analysis
      • Strategies
    • Studies
    • Time and Sales
    • Tool Bar
    • Trade Report
    • Watch List
    • Workspaces
  • Release Notes
    • Release Notes
    • What's New In Version 6.5
    • What's New in Version 6.4
    • What's New in Version 6.3
    • What's New in Version 6.1
    • What's New in Version 6.0
  • Knowledge Base
    • Getting Started
      • Add a Symbol to a Watch List
      • Create a New Page
      • Create a New Workspace
      • Free Data Sources
      • Linux Installation
      • Resize Console Panels
      • Set Up a Simulated Account
      • Does MotiveWave Come With Data?
      • Can MotiveWave Be Used on Multiple Computers?
      • Futures Symbol Table
    • Connection
      • Connection Details
      • Add a Connection to a Workspace
      • Rithmic - Connection Issues and Troubleshooting
      • Connect MotiveWave to R|Trader Pro Gateway
      • GAIN Connection
      • Indian Market Connections
      • Interactive Brokers Connection
        • Troubleshooting Interactive Brokers Connection
        • Historical Data is Slow with Interactive Brokers
      • CQG Symbology
      • TD Ameritrade Search
      • Rithmic Eurex Symbology
      • Computer Sleep Mode
      • IQFeed Data
      • Another Instance of MotiveWave Is Using License Key
    • Workspace
      • Add a Connection to a Workspace
      • Create a New Workspace
      • Create a Workspace Backup
      • Restore a Workspace Backup
      • Switch Connections in a Workspace
      • Workspaces Not Showing Up
    • Charts
      • Adjust for a Stock Split
      • Assign Trading Hours to an Instrument
      • Component and Study Visibility
      • Different Charts for the Same Instrument
      • Make Studies Stick to a Chart
      • Trend Lines Don't Line up on Different Bar Sizes
      • Use a Display Mask
      • Create Tick, Range, PnF, or Renko Chart
      • Clicking on the Tab of One Chart Changes Tab of Other Charts
      • Charts Stopped Streaming Data
      • Charts Show Incorrect Historical Data
      • Time Range Measurements Are Incorrect
      • Limited Tick Data on Charts
      • Set Start Time for Chart Bars
      • View List of Studies and Components on Chart
      • Show ETH or Extended Data
    • Trading
      • Position Average Is Changing Overnight
      • Execute Trades on Another Account
    • General
      • Change Themes
      • Define Trading Hours
      • Futures Contract Backfill
      • Reset the Console Layout
      • Set a Default Account
      • Set Up a Repository
      • Set Up Gmail for Email Alerts
      • Set Up iCloud Mail for Email Alerts
      • MotiveWave Covers Windows Taskbar
      • Limit Instruments in Quick Search
      • Can’t See My Menu Anymore
      • Trade Report Is Incorrect
    • Study
      • Component and Study Visibility
      • Order Heatmap Study Not Showing
      • Forex With Volume Related Studies
      • Add a Custom Study
      • Volume Imprint or TPO Overlap
      • Use Real Values
    • Elliott Wave
      • Elliott Wave Data Window vs Start Date
      • Elliott Wave Functionality
      • Show Multiple Elliott Wave Ratios
      • Stacked Wave Labels
    • Scan
      • What Do the Scanner Results Fair, Good, Etc. Mean?
    • SDK
      • Create a Custom Study or Strategy
    • Optimize - Backtest
      • Backtesting Limitations
    • Support
      • Access Log Files
      • Active Session Exists
      • Create a Workspace Backup
      • Find My License Key and Edition
      • Minimum System Requirements
      • MotiveWave Extensions Directory
      • Uninstall MotiveWave
      • Data Loss
      • Trendlines Shift on Nonlinear Charts
      • Slow Application Performance
    • Error Messages
      • Forex.com - Error Placing Order: 75
      • Binance - Connection Failed: Invalid API Key
      • Binance Futures - Unable to load listen keys
      • IQFeed - Error: Index 1 out of bounds for length 1
      • IQFeed - Connection Failed
      • State Error
      • Error Placing Order(s)
    • Purchase
      • Upgrade from a Lease to a Purchased License
      • Upgrade from a Lower Edition Purchased License to a Higher Edition Purchased License
      • Recently Purchased Where Is My License Key?
      • PayPal Payments
      • How Do I Cancel My Lease?
      • Are Updates to the Software Free?
    • FAQ
      • Can I Add Commentary
      • Can I Have a Simulated and a Live Trading Account
      • Can I Have More Than One Broker Account
      • Can I Save My Analysis
      • Can I Trade from the Chart
      • Can I Use MotiveWave on Multiple Computers
      • Does MotiveWave Support macOS
      • Does MotiveWave Support Multiple Computer Screens
      • How Do I Log in to MotiveWave
      • How Do I Make Point & Figure and Hybrid Renko Charts
      • How Do I Position and Size the Chart Windows on a Specific Screen
      • How Do I Save My Charts
      • How Do I Sync MotiveWave Between Two Computers
      • What Instruments Does MotiveWave Support
      • What Is Compact Mode for Chart Windows
      • Where Are the Chart Tools
  • Video Tutorials
    • Product Demos
    • Startup and Installation
    • Workspaces
    • Broker and Data Feed Connections
    • Overviews
    • General Configuration
    • Configuring Preferences
    • Charts
    • Analyses vs Alternate Analyses
    • Studies and Strategies
    • Trading
    • Alerts
    • Replay Mode
    • Scanners
    • Fibonacci
    • Harmonics
    • Elliott Wave
    • Webinars
    • Third Party Webinars
  • Studies
    • A - B
    • C - D
    • E - F
    • G - H
    • I - J
    • K - L
    • M - N
    • O - P
    • Q - R
    • S - T
    • U - V
    • W - X
    • Y - Z
Powered by GitBook
On this page
  • MAMA
  • MA Difference
  • MA High Low
  • MA Ribbon
  • Market Exchanges
  • Martin Ratio
  • Market Facilitation Index
  • McClellan Oscillator
  • McClellan Summation Index
  • McGinley Dynamic Indicator
  • Median Average Adaptive Filter
  • Mass Index
  • Mobility Oscillator
  • Momentum
  • Money Flow Index
  • Moon Phases
  • Move Tracker
  • Moving Average Adaptive Filter
  • Moving Average Adaptive Q
  • Moving Average Convergence Divergence (MACD)
  • Moving Average Cross
  • Moving Average Displaced Envelope
  • Moving Average Envelope
  • Moving Average of Oscillator
  • Moving Average Support Resistance
  • Multi Level Indicator
  • Multi Vote OnBalance Volume
  • MWDX Average
  • Narrow Sideways Channel
  • Negative Volume Disparity Indicator
  • Negative Volume Index
  • New Market Paradigm Contraction
  • New Market Paradigm Expansion
  • Net Lines
  1. Studies

M - N

PreviousK - LNextO - P

Last updated 6 months ago

Disclaimer: The information provided on this page is strictly for informational purposes and is not to be construed as advice or solicitation to buy or sell any security. Please see our .

How to access the studies in MotiveWave:

Go to the top menu, choose Study>Study Group>Study Name

or Go to the top menu, choose Study>All Studies> Start typing in the study name until you see it appear in the list> Click on the study name> Click OK.

MAMA

The MAMA or Mother Of Adaptive Moving Averages was authored by John Ehlers. The MAMA uses the current price, three previous prices, several feedback sequences, a few math functions and factors, and some more feedback for its final calculation. A signal line, called the FAMA which is derived from the MAMA, is also given. The user may change the input (midpoint) and the fast and slow factors. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using MAMA

If the MAMA crosses below the FAMA a sell signal will be generated. Conversely, if the MAMA crosses above the FAMA a buy signal will be given.

Calculation

//input = price, user defined, default is midpoint //fast = user defined, default is .5 //slow = user defined, default is .05 //prev = previous, index = current bar number

prevPrice1 = price[index-1];
prevPrice2 = price[index-2];
prevPrice3 = price[index-3];
prevPrd = period[index-1];
smooth = (4 * price + 3 * prevPrice1 + 2 * prevPrice2 + prevPrice3)  / 10;
prevS2 = smooth[index-2];
prevS4 = smooth[index-4];
prevS6 = smooth[index-6];
det = (.0962 * smooth + .5769 * prevS2 - .5769 * prevS4 - .0962 * prevS6) * (.075 * prevPrd + .54);
prevD2 = det[index-2];
prevD3 = det[index-3];
prevD4 = det[index-4];
prevD6 = det[index-6];
q1 = (.0962 * det + .5769 * prevD2 - .5769 * prevD4 - .0962 * prevD6) * (.075 * prevPrd + .54);
i1 = prevD3;
prevQ1x2 = q1[index-2];
prevQ1x4 = q1[index-4];
prevQ1x6 = q1[index-6];
prevI1x2 = i1[index-2];
prevI1x4 = i1[index-4];
prevI1x6 = i1[index-6];
j1 = (.0962 * i1 + .5769 * prevI1x2 - .5769 * prevI1x4 - .0962 * prevI1x6) * (.075 * prevPrd + .54);
jq = (.0962 * q1 + .5769 * prevQ1x2 - .5769 * prevQ1x4 - .0962 * prevQ1x6) * (.075 * prevPrd + .54);
i2 = i1 - jq;
q2 = q1 + j1;
prevI2 = i2[index-1];
prevQ2 = q2[index-1];
i2 = .2*i2 + .8 * prevI2;
q2 = .2*q2 + .8 * prevQ2;
re = i2*prevI2 + q2 * prevQ2;
im = i2*prevQ2 - q2 * prevI2;
prevRe = re[index-1];
prevIm = im[index-1];
re = .2*re + .8 * prevRe;
im = .2*im + .8 * prevIm;
if (im != 0 AND re != 0) period = 360/Math.atan(im/re);
if (period moreThan 1.5 * prevPrd) period = 1.5 * prevPrd;
if (period lessThan .67 * prevPrd) period = .67 * prevPrd;
if (period  50) period = 50;
period = .2 * period + .8 * prevPrd;
prevSprd = sprd[index-1];
sPrd = .33 * period + .67 * prevSprd;
if (i1 != 0) phase = Math.atan(q1/i1);
prevPhase = phase[index-1];
deltaPhase = prevPhase - phase;
if (deltaPhase lessThan 1) deltaPhase = 1;
alpha = fast / deltaPhase;
if (alpha lessThan slow) alpha = slow;
prevMama = mama[index-1];
prevFama = fama[index-1];
Plot1: mama = alpha * price + (1 - alpha) * prevMama;
Plot2: fama = .5 * alpha * mama + (1 - .5 * alpha) * prevFama;
 //Signals
buy = crossedAbove(MAMA, FAMA);
sell =crossedBelow(MAMA, FAMA);

MA Difference

MA Difference displays the difference between two moving averages as a graph. If the first moving average is above the second the value will be positive, otherwise the value will be negative. The user may change the inputs (close), methods (SMA), shift amounts and period lengths. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using MA Difference

No trading signals are calculated for this indicator.

Calculation

//input = price, user defined, default is close //method = moving average (ma), user defined, default is SMA //period1 = user defined, default is 10 //shift1 = user defined, default is 0 //input2 = price, user defined, default is close //method2 = moving average (ma), user defined, default is SMA //period2 = user defined, default is 5 //shift2 = user defined, default is 0 //index = current bar number

MA1 = ma(method, index+shift1, period1, input);
MA2 = ma(method2, index+shift2, period2, input2);
PlotHist: diff = MA1 - MA2;

MA High Low

The MA High Low study displays two lines: a moving average of the highest high over a given period and the lowest low over a given period. The user may change the method (WMA), period and shift lengths. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using MA High Low

No trading signals are calculated for this indicator.

Calculation

//method = moving average (ma), user defined, default is WMA //highPeriod = user defined, default is 14 //highMAPeriod = user defined, default is 14 //highShift = user defined, default is 0 //lowPeriod = user defined, default is 14 //lowMAPeriod = user defined, default is 14 //lowShift = user defined, default is 0 //index = current bar number

//high_line = ma( Highest(highPeriod), highMAPeriod ) 
//low_line = ma( Lowest(lowPeriod), lowMAPeriod )
highest = highest(index,  highPeriod, HIGH);
Plot1: TOP = calcMAAt(index, method, HIGHEST, highMAPeriod, highShift);
lowest = lowest(index, lowPeriod, LOW);
Plot2: BOTTOM = calcMAAt(index, method, LOWEST, lowMAPeriod, lowShift);
// Calculate the midpoint
Plot3: MIDDLE = (top + bottom)/2;

MA Ribbon

Moving Average Ribbon (MA Ribbon) combines multiple moving average lines (MAs) with different periods to smooth out the price movements, using the given method and period. This method provides illustrations for the direction and the strength of the trend.

Though the SMA is often used to create a ribbon, MotiveWaveâ„¢ provides various MA options to support users' decisions. There are other components that users can adjust to their preference: Period (bars), Step, and MA Count.

The MA Count is the number of MA lines in the ribbon, usually set at 6 lines. The period (bars) shows the time frame or period length. The step determines the distance between the lines. Each Moving Average in the series will increment the period using the step.

For example, in the setting below, the given period is 2, which means each line will take into consideration the past 2 bars of the price data. For the step that is set to 2, it indicates the spacing between two subsequent lines, and the lines will be computed as 2,4,6,8,10 ... periods.

The period (bars) affects the sensitivity of the ribbon. With shorter periods (2, 5, or 10, etc.), the ribbon is closer the price data, more sensitive to changes and, therefore, reacts quickly to the price movement. Longer periods (such as 100, 200, or 250, etc.) make the ribbon move farther from the price line and, therefore, are less sensitive and respond slower to changes, but provide broader views of the market condition with less noise and false signals.

The step influences the appearance and distribution of the ribbon, where smaller values result in tighter ribbon lines and larger values create wider lines.

How to trade using MA Ribbon

There are several ways for users to utilize the MA Ribbon:

First, the MA Ribbon can help spot bullish and bearish trends through crossovers between the prices and the ribbon. If the prices cross above the MA series, it might indicate bullish signals and, therefore, opportunities for buying. Conversely, if the prices fall below the MA series, it suggests bearish trends - users can consider selling. If the ribbon twists in one spot, a change in trend direction may occur, providing potential opportunities to buy or sell.

Secondly, the MA Ribbon can help identify overall trend directions. If the ribbon rises and the prices continue to reach above it, this is a strong sign of an uptrend. Conversely, a downtrend can be confirmed if the ribbon is moving down and the prices keep falling below it.

Next, the width of the ribbon indicates trend strength. A wider ribbon illustrates a stronger trend, while a narrower ribbon may suggest the trend has become weaker. In addition to a ribbon's width, the slope of the ribbon might provide more reliability in decision-making. To be specific, a ribbon that is moving upward with a consistent width indicates a strong bullish trend, therefore, it might be a good time to buy. In contrast, if the ribbon is stably wide and going downward, it suggests a bearish trend and an opportunity to sell. Meanwhile, a narrow ribbon indicates weak market momentum, therefore, traders should be careful in buy and sell activities.

Finally, the MA Ribbon when set to long-term periods and steps, can act as support and resistance levels. In a downtrend, if the price keeps bouncing off the upper boundary of the ribbon, this upper line will act as resistance and there might be an opportunity to sell. In an uptrend, if the price keeps bouncing back from the bottom line, this line will act as the support level, which presents a signal to buy.

Market Exchanges

Market Exchanges indicator displays the past and future, opening and closing times of a user-selected market exchange. The bar type must be linear and the interval must be less than 1 day. In case the components don't show up on the chart, Enable the "Show Extended Data" option. Although many market holidays are used in the calculations, not all holidays in all exchanges are considered. However, all markets are assumed to be closed on Saturdays, Sundays, Christmas and New Year's. The user can select a market exchange, whether to display the open-close tag and the exchange letters, the font, and the line and text colors. This indicator’s definition is further expressed in the code given below.

How To Trade Using Market Exchanges

Market Exchanges may assist in trading decisions, but no trading signals are generated by this study, expressed in the code given below.

Calculation

Code may be available on request

Martin Ratio

The Martin Ratio or Ulcer Performance Index was authored by Peter G. Martin. The higher the Martin Ratio the better the instrument’s performance. The main ingredients are the current price and a prior price which are adjusted with the user-defined safe return. An average and the Ulcer Index are taken; and the Martin Ratio is their quotient. The user must select linear bars but may change the input (close), period length and a safe return value. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using the Martin Ratio

The Martin Ratio may be used to evaluate an instrument’s performance. No trading signals are calculated.

Calculation

//input = price, user defined, default is close //period = p1, user defined, default is 30 //safe = safe return percentage, user defined, default is 2 //av = average, pow = power //sma = simple moving average //index = current bar number //sqrt = square root

safe = safe / 100;  //convert percent to decimal
BarSize bar = getBarSize();
if (bar.getType() == BarSizeType.LINEAR) barMin = bar.getInterval();
else return;
minPerYr = 60*24*30*12;
barsPerYr = minPerYr/barMin;
adjSafe = Math.pow((1 + safe), p1/barsPerYr) - 1; //safe return per period compounded
priorP = price[index-p1];
ret = ((100 * (price/priorP)-1)) - (adjSafe*100); //safe return subtracted here to reflect Sharpe 1994 revision
av = sma(index, p1, ret);
ulcer = ulcer(index, p1, ret);
Plot: martin = av/ulcer;

Market Facilitation Index

The Market Facilitation Index (MFI) was authored by Bill Williams. Important cases to look for:

1. MFI Up and Volume Up – the movement has begun and picks up speed.

2. MFI Down and Volume Down – market participants are no longer interested.

3. MFI Up and Volume Down – market is not supported by clients.

4. MFI Down and Volume Up – battle between bears and bulls. No user inputs are required for this study. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using the Market Facilitation Index

No trading signals are calculated for this indicator.

Calculation

//index = current bar number

vol = getVolume(index);
PlotHist: MFI = (getHigh(index) - getLow(index)) * 1000 / vol;

McClellan Oscillator

The McClellan Oscillator was created by Sherman and Marian McClellan in 1969. This oscillator is a breadth indicator based on two moving averages of Net Advances. Net Advances = Advances - Declines, where Advances are numbers of stocks that closed higher and Declines are those that closed lower.

McClellan Oscillator value = (19-day EMA of Net Advances) - (39-day EMA of Net Advances),

where EMA is the Exponential Moving Average;

19-day EMA is a short-term or Fast EMA that represents recent market activities,

39-day EMA is a long-term or Slow EMA that shows general market movements.

McClellan Oscillator values reflect market capital conditions. When the value is positive (the advancing issues are higher than the declining issues), it indicates a growing market capital and, therefore, a signal for a bullish trend. Conversely, the value shows a decrease in the market capital and signals bearish conditions when the value is negative (the advancing issues are lower than the declining issues). In addition, extreme values can point out overbought (extremely positive) or oversold (extremely negative) conditions.

How to trade using the McClellan Oscillator

MotiveWaveâ„¢ offers two graphs to help illustrate the indicator: one shows the histogram and the other shows the Fast EMA and Slow EMA lines.

The histogram at the bottom illustrates how the McClellan Oscillator fluctuates around the zero line. The moment the oscillator moves above the zero line suggests bullish signals or buying opportunities. Meanwhile, the moment the oscillator moves below the zero line indicates bearish signals or selling opportunities.

Additionally, extremely high or low values can be used to identify market conditions (overbought/oversold). When the value is highly positive, the market is in overbought condition and traders should consider selling. Conversely, when the value is highly negative, the market is experiencing oversold condition, and traders should consider buying.

Users can also use the crossover graph at the top to recognize buy and sell opportunities. When the Fast MA line crosses below the Slow MA line, sell signals will be generated. Meanwhile, if the Fast MA line crosses above the Slow MA line, buy signals will be given.

McClellan Summation Index

McClellan Summation Index displays the cumulative sum of the McClellan Oscillator. Since this index is the accumulation of the daily McClellan Oscillator values, it provides a long-term perspective. Compared to the Oscillator, the Index is slower in response but smoother with less noise, therefore, helping traders focus on the overall trends and highlight major turning points in the market.

How to trade using McClellan Summation Index

Firstly, a positive index indicates a bullish market, therefore, suggesting buying opportunities. Conversely, a negative index gives a signal of a bearish market, which offers selling opportunities.

Next, the thresholds of this index are +1000 and -1000 with zero line dividing them. When the index consistently stays above +1000, it shows a sign of a strong bull market. In contrast, when the index is consistently below -1000, it indicates a strong bear market.

Another way to use the index for identifying major trend shifts is by looking at the crossover of the McClellan Summation line and the zero line. If the index line crosses above the zero line, it confirms a bullish phase, and traders might consider going long. If the index line falls down the zero line, the bearish phase might start soon and the market trend might decline, which indicates that traders might consider existing long positions or going short

The McClellan Summation Index can be used in conjunction with other indicators to confirm market strength and trend directions.

McGinley Dynamic Indicator

John R. McGinley is the author of the McGinley Dynamic Indicator. It is a moving average (MA) that focuses on improving the delay in response to market movements, which is a big issue with traditional MAs. By applying a smoothing factor, the indicator can catch up with the speed of the market (dynamic). The McGinley Dynamic Indicator is highly responsive, self-adjusted, and generates less noise and false signals.

How to trade using McGinley Dynamic Indicator

The McGinley Dynamic Indicator is a great tool to be used in conjunction with other technical analyses to confirm signs, such as RSI, MACD, or other volume indicators.

Median Average Adaptive Filter

The Median Average Adaptive Filter (MAAF) was authored by John Ehlers. The MAAF requires the current price and three previous prices, some averaging, some while loop for an alpha calculation and then a final feedback to fill its calculation. The user may change the input (midpoint) and a threshold value. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using the Median Average Adaptive Filter

The Median Average Adaptive Filter is a trend indicator and may be used in conjunction with other studies. No trading signals are calculated.

Calculation

//input = price, user defined, default is midpoint //th = threshold = user defined, default is .002 //median = function, returns price at middle of period //prev = previous, index = current bar number

len = 39;
prevP1 = price[index-1];
prevP2 = price[index-2];
prevP3 = price[index-3];
smth = (price + 2*prevP1 + 2*prevP2 + prevP3) / 6;
value3 = .2;
prevV2 = value2[index-1];
while (value3 moreThan th AND len moreThan 0)
    alpha = 2 / (len + 1);
    value1 =  median(len, smth);
    value2 = alpha * smth + (1 - alpha) * prevV2;
    if (value1 != 0) value3 = Math.abs(value1 - value2) / value1;
    len = len - 2;
endWhile
if (len lessThan 3) len = 3;
alpha = 2 / (len +1);
prevF = filt[index-1];
Plot: filt = alpha*smth + (1 - alpha) * prevF;

Mass Index

Mass Index by Donald Dorsey uses highs, lows and exponential moving averages to indicate upcoming price reversals. The key event is called a reversal bulge, which occurs when the Mass Index rises above the 27 line and then falls below 26.5. A trend indicator, which is an EMA of the close, is used to determine whether the signal is buy or sell. The user may change the input (close), methods(EMAs), period lengths and guide values. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using Mass Index

Mass Index is used with Mass Index Trend to determine a buy or sell signal. The first condition (C1) for either signal is dependant on the previous path of Mass Index. It must have crossed above the top guide set at 27 and then have fallen through the bottom guide set at 26.5. A sell signal is given when C1 AND an up trend. Conversely, a buy signal is generated when C1 AND a downtrend.

Calculation

//key = price (user defined, default is closing price) //method = moving average (user defined, default is EMA) //period1 = user defined, default is 21 //period2 = user defined, default is 21 //period3 = user defined, default is 25 //trendPeriod = user defined, default is 9 //trendMethod = moving average (user defined, default is EMA) //LT = less than, index = current bar number //MT = more than

Plot1: TREND = ma(trendMethod, index, trendPeriod, key);
HL = high - low;
firstEma = ma(method, index, period1, HL);
secondEma = ma(method, index, period2, firstEma);
RATIO = secondEma / firstEma;
ALERT = false;
Plot2: massIndex = sum(index, period3, RATIO);
//Signals
lastTrend = TREND[index-1];
prevAlert = ALERT[index-1];
upTrend = lastTrend LT  TREND;
downTernd = lastTrend MT TREND
if (massIndex MT topGuide) ALERT = true);
if (massIndex MT bottGuide AND prevAlert) ALERT = true);
sell = massIndex LT bottomGuide AND prevAlert AND upTrend;
buy = massIndex LT bottomGuide AND prevAlert AND downTrend;

Mobility Oscillator

The Mobility Oscillator was authored by Mel Widner, Stocks and Commodities Magazine 02/1996. This Indicator uses the highest highs, lowest lows, loops within loops, many if ands or equals, and even a prior close to arrive at its oscillator value. It uses a price distribution function and may be useful in predicting price mobility. The user may change the period lengths. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using Mobility Oscillator

Mobility Oscillator may be used in conjunction with other indicators. No trading signals are given.

Calculation

//period = user defined, default is 14 //m = user defined, default is 10 //pdf = price distrubition function //index = current bar number, LOE = less or equal //MOE = more or equal

Plot: mo = -mo(m, index, period);
....
Method mo(m, index, period)
hMax = highest(index, period, high);
lMin = lowest(index, period, low);
rX = (hMax -lMin) / m;
bL = 0, bU = 0, pdfI = 0, pdfC = 0, pdfMx = 0;
imX = 1, priorClose = 0, x = 0;
for(i=index-m+1; i LOE index; i++)
    bU = lMin + ((x + 1) * rX);
    bL = bU - rX;
    pdfI = pdf(i, (x+1), m, period);
    if (x == 0) pdfMx = pdfI;
    if (pdfI moreThan pdfMx) imX = x + 1; pdfMx = pdfI;}
    if (x == 0) pdfC = pdfI;
    priorClose = close[period-1];
    if (priorClose moreThan bL AND priorClose LOE bU) pdfC = pdfI;
    x++;
endFor
pmo = lMin + (imX - .5) * rX;
moVar = 100 * (1 - pdfC / pdfMx);
if (priorClose lessThan pmo) moVar = -moVar;
return moVar;
endMethod
....
Method pdf(index, value1, m, period)
hMax = highest(index, period, high);
lMin = lowest(index, period, low);
hi = 0;
lo = 0;
pdf = 0;
rX = (hMax - lMin) / m;
bL = lMin + ((value1 - 1) * rX);
bU = lMin + (value1 * rX);
for(i=index-period+1; i LOE index; i++) 
    hi = high[i];
    lo = low[i];
    if (hi LOE lo) continue;
    if (hi LOE bU) pdf++;
    if (!(hi LOE bU OR lo MOE bU)) pdf = pdf + (bU - low) / (hi - lo);
    if (hi lessOr= bL) pdf--;
if (!(hi LOE bL OR lo MOE bL)) pdf = pdf - (bL - low) / (hi - lo);
return pdf / period;
endMethod
....

Momentum

Momentum measures the price movement over a user-defined time period. It is calculated as a ratio of the current bar’s price to the price several (N) bars ago. Formula: MOMENTUM = CLOSE(i) / CLOSE(i-N)*100. The user may change the input (close) and period length. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using Momentum

No trading signals are calculated for this indicator.

Calculation

//input = price, user defined, default is close //period = user defined, default is 14 //index = current bar number

curVal = price[index];
prevVal = price[index-period];
Plot: val = (curVal / prevVal) * 100;

Money Flow Index

The Money Flow Index (MFI) is similar to the Relative Strength Index in how it is calculated and interpreted. MFI is considered to be more rigid since it is volume-weighted and illustrates the flow of money in and out of an instrument. The user may change only the period length. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using Money Flow Index

Adjust the top and bottom guides to control the quantity and quality of the trading signals. If the MFI crosses above the top guide a sell signal will be generated, Conversely, if the MFI crosses below the bottom guide a buy signal will be given.

Calculation

//period = user defined, default is 20 //LT = less than, LOR= = less or equal //index = current bar number

PMF = 0; // positive money flow
NMF = 0; // negative money flow
pTP = getTypicalPrice(index-period);
for(i = index-period+1; i LOR= index; i++)
    double TP = getTypicalPrice(i); 
    double MF = TP * getVolume(i); // money flow
    if (TP MT pTP) PMF += MF;
    else NMF += MF;
    pTP = TP;
endFor
Plot: MFI = 100 * ( PMF / (PMF + NMF) );
// Signals
buy =  crossedAbove(MFI, topGuide);
sell = crossedBelow(MFI, bottGuide);

Moon Phases

The Moon Phases study displays moon phases as lines on the price graph. Moon phases are based on GMT time. The user may choose to display new and quarter moons, and may alter the show time, 24-hour clock, and show top, bottom options. The defaults are shown below.

How To Trade Using Moon Phases

Moon Phases! No trading signals are calculated.

Calculation

//show new moons, user defined, default is false //show quarter moons, user defined, default is false //show time, user defined, default is true //show 24 hour clock, user defined, default is false //show top, user defined, default is true //show bottom, user defined, default is true

Code may be available on request.

Move Tracker

The Move Tracker (MT) was authored by Omega Research 1996. The MT uses the difference between price and previous price for its main line, and for the signal line, it uses the difference between MT and previous MT. The user may only alter the input (close). This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using Move Tracker

Although a signal line is plotted, no trading signals are calculated for this indicator.

Calculation

//input = price, user defined, default is close //prev = previous, sig = signal //index = current bar number

prevP = price[index-1];
Plot1: mt = price - prevP;
prevMt = mt[index-1];
Plot2: sig = mt - prevMt;

Moving Average Adaptive Filter

The Moving Average Adaptive Filter (MAAF) was authored by Perry Kaufman in the Stocks and Commodities Magazine 03/1998. The MAAF uses price, previous price and a prior price in a series of mathematical manoeuvres including feedback to arrive at its final form. The user may change the input (close), period length and filter value. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using Moving Avg Adaptive Filter

Moving Average Adaptive Filter may be used in conjunction with other indicators. No trading signals are given.

Calculation

//input = price, user defined, default is close //period = user defined, default is 10 //filter = user defined, default is .15 //prev = previous, abs = absolute value //pow = power, index = current bar number //std = standard deviation

fastest = 0.667;
slowest = 0.0645;
prevP = price[index-1];
diff = abs(price - prevP);
priorP = price[index-period];
signal = abs(price - priorP);
noise = sum(period, DIFF);
ratio = signal / noise;
sm = pow(ratio * (fastest - slowest) + slowest, 2);
prevAma = ifNull(price, ama[index-1]);  //returns price on first try
ama = prevAma + sm * (price - prevAma);
amaDiff = ama - prevAma;
PlotHist: MAAF = std(index, period, amaDiff) * filter;

Moving Average Adaptive Q

The Moving Average Adaptive Q (MAAQ) was authored by Perry Kaufman in the Stocks and Commodities Magazine 06/1995. The MAAQ uses price, previous price and a prior price in a series of mathematical manoeuvres including feedback to arrive at its final form. The user may change the input (close) and the period length. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using Moving Average Adaptive Q

Moving Average Adaptive Q may be used in conjunction with other indicators. No trading signals are given.

Calculation

//input = price, user defined, default is close //period = user defined, default is 10 //prev = previous, abs = absolute value //pow = power, index = current bar number //lrv[0] = a in the line equasion y = a + mx

fastest = 0.667;
slowest = 0.0645;
prevP = price[index-1];
diff = abs(price - prevP);
priorP = price[index-period];
priorDiff = abs(price - priorP);
sumPrev = sum(period, DIFF);
prevMaaq = ifNull(price, maa[1]);  //returns price on first try
temp = ((priorDiff / sumPrev) * fastest) + slowest; 
Plot: maaq = prevMaaq + pow(temp, 2) * (price - prevMaaq); 

Moving Average Convergence Divergence (MACD)

Moving Average Convergence Divergence (MACD) is a popular technical analysis that gives users insights into trend direction, potential reversals and divergences, and trading opportunities. It was authored by Gerald Appel in the 1960s, and in 1986, Thomas Aspray added a histogram. There are three main components in a MACD chart: MACD Line, Signal Line, and a histogram. The MACD shows the difference between a fast moving average (usually a 26-period EMA) and a slow moving average (typically a 12-period EMA). It is often used to indicate changes in market trends. The Signal Line is another short-term moving average of the MACD line (usually a 9-period EMA), used to smooth out the MACD, and the crossovers between MACD and Signal Lines might signal the buy or sell opportunities. The histogram represents the difference between the MACD and Signal Line.

How To Trade Using the Moving Average Convergence Divergence (MACD)

The user may change the input (close), methods, and period lengths. The MACD may be used as a trend-changing indicator. A buy signal will be generated if the MACD line (white) crosses above the Signal line (red). Conversely, a sell signal will be given if the MACD crosses below the Signal line.

Traders can identify potential divergences based on the MACD. When the price makes higher highs but the MACD makes lower highs, it might be a bearish divergence and the trend might reverse from up to the downside. Conversely, when the price makes lower lows but the MACD shows higher lows, it might indicate a bullish divergence and a reversal to the upward direction.

The MACD might be used in conjunction with other indicators for more accurate readings. For example, traders usually combine the RSI to identify overbought/oversold conditions, along with the MACD's ability to show trend momentums or reversals.

Calculation

This indicator’s definition is further expressed in the condensed code given in the calculation below.

//input = price, user defined, default is close //method = moving average (ma) user defined, default is EMA //signal method = moving average (ma) user defined, default is SMA //period1 = user defined, default is 12 //period2 = user defined, default is 26 //signal period = user defined, default is 9 index = current bar number

MA1 = ma(method, index, period1, input);
MA2 = ma(method, index, period2, input);
Plot1: MACD = MA1 - MA2;
//Calculate moving average of MACD (signal line)
Plot2: signal = ma(signalMethod, index, signalPeriod, MACD);
PlotHist: MACD - signal;
//Check for signal events
buy = crossedAbove(MACD, SIGNAL)
sell = crossedBelow(MACD, SIGNAL)

Moving Average Cross

The Moving Average Cross displays a fast and a slow-moving average (MA). A signal arrow is shown when the two MAs cross. An up arrow is displayed if the fast MA crosses above the slow MA and a down arrow is given if the fast MA crosses below the slow MA. The user may change the inputs (close), methods (EMA) and period lengths. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using Moving Average Cross

If the fast MA crosses above the slow MA, a buy signal will be generated. Conversely, if the fast MA crosses below the slow MA,a sell signal will be given.

Calculation

//fastInput = price, user defined, default is close //slowInput = price, user defined, default is close //fastMethod = moving average (ma), user defined, default is EMA //slowMethod = moving average (ma), user defined, default is EMA //fastPeriod = user defined, default is 10 //slowPeriod = user defined, default is 20 //index = current bar number

fastMA = ma(fastMethod, index,  fastPeriod, fastInput);
slowMA = ma(slowMethod, index, slowPeriod, slowInput);
// Check to see if a cross occurred and raise signal.
buy = crossedAbove(fastMA, slowMA);
sell = crossedBelow(fastMA, slowMA);

Moving Average Displaced Envelope

Moving Average Displaced Envelope by Omega Research. These envelopes are calculated by multiplying percentage factors with their displaced exponential moving average (EMA) core. The user may modify the input (close), method (EMA), periods, factors and displacements. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using Moving Average Displaced Envelope

Adjust the envelopes' percentage factors to control the quantity and quality of the signals. If a previous high goes above the envelope, a sell signal is generated. Conversely, if the previous low goes below the envelope, a buy signal is given.

Calculation

//input = price, user defined, default is closing price //method = moving average, user defined, default is EMA //period = user defined, default is 9 //perAb = percent above = user defined, default is .5 //perBl = percent below = user defined, default is .5 //disp = displacement = user defined, default is 13 //index = current bar number //ma = moving average, prev = previous

Plot1: top = ma(method, index-disp, period, input) * ((100 + perAb)/100);
Plot2: bott = ma(method, index-disp, period, input) * ((100 - perBl)/100);
//Signals
prevHigh = high[1];
prevLow = low[1];
sell = prevHigh moreThan top;
buy = prevLow lessThan bott;

Moving Average Envelope

The Moving Average Envelope adds a parallel line above and below a moving average using a given percentage of the price. These lines can be useful for identifying short-term price fluctuations. The user may change input (close), method (EMA), period, shift and deviation values. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using Moving Average Envelope

Adjust the envelopes' percentage factors to control the quantity and quality of the signals. If a previous high goes above the envelope, a sell signal is generated. Conversely, if the previous low goes below the envelope, a buy signal is given.

Calculation

//input = price, user defined, default is close //method = moving average (ma), user defined, default is EMA //period = user defined, default is 20 //shift = user defined, default is 0 //topDev = percent, user defined, default is 2.5 //bottomDev = percent, user defined, default is 2.5 //LT = less than, LOE = less or equal

latest = size()-1;
end = latest;
if (shift LT 0) end -= shift; 
topDev = topDev/100;
bottomDev = bottomDev/100;
// Calculate top and middle and bottom lines
for(int i = period; i LOE end; i++)
    ma = ma(method, i, period, input);
   Plot1: top[i+shift] = ma + topDev * ma;
   Plot2: middle[i+shift] =  ma;
   Plot3: bottom[i+shift] = ma - bottomDev * ma;
endFor    

Moving Average of Oscillator

The Moving Average of Oscillator (OSMA) is the difference between an oscillator and its smoothed value. The MACD is used as the oscillator and the MACD signal is used as the smoothed value. Each bar is calculated as: osma = macd – signal. The user may change the input (close), methods and period lengths. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using the Moving Average of Oscillator

The Moving Average of Oscillator (OSMA) may be used as a trend-changing indicator. No signals are calculated for this study. Calculation

//input = price, user defined, default is close //method = moving average (ma) user defined, default is EMA //signal method = moving average (ma) user defined, default is SMA //period1 = user defined, default is 12 //period2 = user defined, default is 26 //signal period = user defined, default is 9

MA1 = ma(method, period1, input);
MA2 = ma(method, period2, input);
MACD = MA1 - MA2;
//Calculate moving average of MACD (signal line)
signal = series.ma(signalMethod, signalPeriod, MACD);
PlotHist: OSMA =  MACD - signal;

Moving Average Support Resistance

Moving Average Support Resistance was authored by Dennis L. Tilley in the Stocks and Commodities Magazine 09/1998. A simple moving average is multiplied and divided by a support resistance factor. The user may change the input (close), method (SMA), period length and factor. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using Moving Average Support Resistance

Adjust the support/resistance factor to control the quantity and quality of the trading signals. If the price is above the top band a sell signal will be generated. Conversely, if the price is below the bottom band a buy signal will be given.

Calculation

//input = price, user defined, default is closing price //method = moving average = ma, user defined, default is SMA //period = user defined, default is 10 //fac = percent factor = user defined, default is 2 //index = current bar number

masr = ma(method, index, period, input);
suppLevel = (1 + (fac / 100));
Plot1: top = masr * suppLevel;
Plot2: bott = masr / suppLevel;
//Signals
price = input[index];
sell = price moreThan top;
buy = price lessThan bott;

Multi Level Indicator

The Multi Level Indicator was authored by Vladimir Vladimirovich Voznjuk in the Stocks and Commodities Magazine Sept 2012. Use 1-minute price bars only. The close minus open of the 1-minute price bars are compared to a signal level close minus open time frame. The user may change the input (5 minute) and factor (10000). This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using the Multi Level Indicator

Adjust the top and bottom guides to control the quantity and quality of the trading signals. When the z value rises above the top guide a sell signal will be generated. When the z value falls below the bottom guide a buy signal will be given.

Calculation

//input = tFrame, user defined, default is 5 Minute //factor = user defined, default is 10000 //i = current bar number, prev = previous

BarSize bar1 = series.getBarSize();
barMin1 = bar1.getInterval();
if (barMin1 != 1)
    return;
endif    
xBarMin = convert(tFrame);
size = size();
if (size lessThan xBarMin ) return;

for (int i = xBarMin; i lessThan size; i++)
      close = series.getClose(i);
      open1 = series.getOpen(i);
      openx = series.getOpen(i - xBarMin); 
      Plot: z = ((close - open1) - (close - openx)) * factor;
       //Signals
      boolean sell = prevZ lessThan topGuide AND z moreThan topGuide;
      boolean buy = prevZ moreThan bottomBuide AND z lessThan bottomGuide;
endFor

Multi Vote OnBalance Volume

Multi Vote OnBalance Volume was authored by Barry M. VcVicar. Both the current and previous, highs, lows and closes, step into the voting booth. The ballot is for volume. If their current is greater than their previous, their vote is a plus, otherwise a minus. The votes are tallied, multiplied by the volume and together with feedback the MVO histogram is plotted. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using Multi Vote OnBalance Volume

The Multi Vote OnBalance Volume may be used in conjunction with other indicators. No trading signals are calculated.

Calculation

//prev = previous, index = current bar number

prevC = close[index-1];
prevL = low[index-1];
prevH = high[index-1];
volume = getVolume(index)/1000000; //volume in millions
highVote = 0;
lowVote = 0;
closeVote = 0;
if (high moreThan prevH) highVote = 1;
if (high lessThan prevH) highVote = -1;
if (low moreThan prevL) lowVote = 1;
if (low lessThan prevL) lowVote = -1;
if (close moreThan prevC) closeVote = 1;
if (close lessThan prevC) closeVote = -1;
totVote = highVote + lowVote + closeVote;
prevMvo = mvo[index, 1];
Plot: mvo = prevMvo + (volume * totVote);

MWDX Average

MWDX Average is a type of Exponential Moving Average. The user may change the input (close) and factor (.2). This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using MWDX Average

MWDX Average may be used in conjunction with other indicators. No trading signals are given.

Calculation

//input = price, user defined, default is close //fac = user defined, default is .2 //prev = previous, index = current bar number

value2 = 2/fac -1;
factor = 2 / (value2 + 1);
prevMwdx = isNull(price, Mwdx[index-1]);
Plot: mwdx = factor * price + (1 - factor) * prevMwdx;

Narrow Sideways Channel

Narrow Sideways Channel by Omega Research 1997 uses Standard Deviation in its calculation. Two paths are plotted NSC1, NSC2. The channels are calculated by adding/subtracting a multiple of Standard Deviation (stdDev) from a simple moving average. The user may modify the input (close), method (SMA), periods (14), stdDev factor (3) and range (0). This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Narrow Sideways Channel

The high minus low must be greater than the range (set by user). If a high goes above the top channel a sell signal is generated. Conversely, a buy is given if a low goes below the bottom channel.

Calculation

//input = price (user defined, default is closing price) //method = moving average (user defined, default is SMA) //period = user defined, default is 14 //range = user defined, default is 0 //LT = less than, MT = more than //LOE = less or equal, MOE = more or equal //index = current bar number

count = period;
lastIndex = getEndIndex();
for (index = period; index LOE lastIndex; index++)
    if (index LT count) continue;
    ma = ma(method, period, input);
    stdDev = std(index, period, input);
    top = ma + (stdDev * stdDevFactor);
    bottom = ma - (stdDev * stdDevFactor);
    for (int i = index-(period-1); i LOE index; i++);
        plot1: top;
        plot2: bottom;
        sell  = (high - low) MOE range AND (high MT top);
        buy = (high - low) LOE range AND (low LT  bottom);
    end for;
    count = index + period;
    if (count MT lastIndex)
        period = lastIndex-index;
        count = lastIndex;
    endif;
end for;

Negative Volume Disparity Indicator

Negative Volume Disparity Indicator (NVDI) was authored by Phillip C. Holt, Stocks and Commodities Magazine 06/1996. The NVDI uses Bollinger Bands®, price and previous price, volume and a previous volume to create its plot. A signal line, a moving average of the NVDI, is also plotted. The user may change the input (close), method (SMA), period lengths and number of standard deviations. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using Negative Volume Disparity Indicator

Adjust the top and bottom guides to control the quantity and quality of the trading signals. If the nvdi is above the top guide and crosses below the ma a sell signal will be generated. Conversely, if the nvdi is below the bottom guide and crosses above the ma a buy signal will be given.

Calculation

//input = price, user defined, default is closing price //method = moving average = ma, user defined, default is SMA //period1 = user defined, default is 33 //period2 = user defined, default is 4 //noStd = number of Standard Deviations = user defined, default is 2 //prev = previous, bb = bollinger bands //bb[0] = bb[top], bb[1] = bb[bottom] //index = current bar number

prevV = price[index-1];;
vol = getVolume(index);
prevVol = volume[index-1];
bb[] = bollingerBands(index, period1, noStd, noStd, input);
bbDiff = bb[0] - bb[1];
perb = 0;
if (bbDiff != 0) perb = (price - bb[1])/ (bbDiff);
negVol = ifNull(100, negVol);
if (vol lessThan prevVol) negVol = negVol + ((price - prevV) /(prevV) * 100);
neg[] = bollingerBands(index, period1, noStd, noStd, negVol);
negDiff = neg[0] - neg[1];
negPerb = 0;
if (negDiff != 0) negPerb = (negVol - neg[1])/ (negDiff);
Plot1: nvdi = (1 + perb) / (1 + negPerb);
Plot2: ma = ma(method, index, period2, NVDI);
 //Signals
highSell = nvdi for last sell signal, reset to max_negative at each  buy signal;
lowBuy = nvdi for last buy signal, reset to max_positive at each sell signal;
sell =crossedBelow(NVDI, MA) AND (ma moreThan topGuide) AND (nvdi moreThan highSell) ; 
buy = crossedAbove(NVDI, MA) AND (ma lessThan bottomGuide) AND (nvdi lessThan lowBuy);

Negative Volume Index

The Negative Volume Index by Norman Fosback is a good indicator of bullish trends. It only considers bars that have a lower trading volume than their previous bar. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using Negative Volume Index

The Negative Volume Index is meant as a bullish trending indicator to aid other studies. No trading signals are given.

Calculation

//index = current bar number

prevClose = Close[index-1]; 
prevVolume = Volume[index-1];
prevNvi = NVI[index-1];
temp = (close - prevClose) / prevClose;
if (prevVolume LT volume) temp = 0;
Plot: NVI = prevNvi + temp;
prevClose = Close[index-1]; 
prevVolume = Volume[index-1];
prevNvi = NVI[index-1];
temp = (close - prevClose) / prevClose;
if (prevVolume LT volume) temp = 0;
Plot: NVI = prevNvi + temp;

New Market Paradigm Contraction

The New Market Paradigm Contraction was authored by Walter T. Downs in the Stocks and Commodities Magazine 06/1998. This indicator uses the current and previous Bollinger Bands®, along with some conditional statements, to plot its paths. The user may change the input (close), period length and standard deviation values. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using New Market Paradigm Contraction

Adjust the Standard Deviation and period length to control the quantity and quality of the trading signals. If the price is above the top band, a sell signal will be generated. Conversely, if the price is below the bottom band, a buy signal will be given.

Calculation

//input = price, user defined, default is close //period = user defined, default is 28 //sdUp = standard deviation up, user defined, default is 2 //sdDn = standard deviation down, user defined, default is 2 //bb = bollinger bands, sma = simple moving average, prev = previous //bb[0] = bb top, bb[1] = bb bottom, bb[2] = bb sma //index = current bar number

nmP = 0;
bb[] =  bollingerBands(index, period, sdUp, sdDn, input);
prevBb[] = bollingerBands(index-1, period, sdUp, sdDn, input);
top = bb[0];
bott = bb[1];
cond1 = top lessThan prevBb[0] AND bott moreThan prevBb[1];
cond2 = top moreThan prevBb[0] AND bott lessThan prevBb[1];
cond3 = (cond1 == false) AND (cond2 == false);
if (cond1) nmP = 1;
if (cond2) nmP = 2;
if (cond3) nmP = 3;
up = null;
down = null;
if (nmP == 1)
    up = top;
    down = bott;
endIf
Plot1: up;
Plot2: down;
Plot3: top;
Plot4: bott;
Plot5: bb[2]);
 //Signals
sell = price moreThan bb[0];
buy = price lessThan bb[1];

New Market Paradigm Expansion

The New Market Paradigm Expansion was authored by Walter T. Downs in the Stocks and Commodities Magazine 06/1998. This indicator uses the current and previous Bollinger Bands®;, along with some conditional statements, to plot its paths. The user may change the input (close), period length and standard deviation values. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using New Market Paradigm Expansion

Adjust the Standard Deviation and period length to control the quantity and quality of the trading signals. If the price is above the top band, a sell signal will be generated. Conversely, if the price is below the bottom band, a buy signal will be given.

Calculation

//input = price, user defined, default is close //period = user defined, default is 28 //sdUp = standard deviation up, user defined, default is 2 //sdDn = standard deviation down, user defined, default is 2 //bb = bollinger bands, sma = simple moving average, prev = previous //bb[0] = bb top, bb[1] = bb bottom, bb[2] = bb sma //index = current bar number

nmP = 0;
bb[] =  bollingerBands(index, period, sdUp, sdDn, input);
prevBb[] = bollingerBands(index-1, period, sdUp, sdDn, input);
top = bb[0];
bott = bb[1];
cond1 = top lessThan prevBb[0] AND bott moreThan prevBb[1];
cond2 = top moreThan prevBb[0] AND bott lessThan prevBb[1];
cond3 = (cond1 == false) AND (cond2 == false);
if (cond1) nmP = 1;
if (cond2) nmP = 2;
if (cond3) nmP = 3;
up = null;
down = null;
if (nmP == 2)
    up = top;
    down = bott;
endIf
Plot1: up;
Plot2: down;
Plot3: top;
Plot4: bott;
Plot5: bb[2]);
//Signals
sell = price moreThan bb[0];
buy = price lessThan bb[1];

Net Lines

Net Lines is a reversal pattern indicator. Traders use this indicator to observe successive price movements by drawing Net Lines as a preference for potential buy or sell signals. After a chosen consecutive up or down bars (Time Out - usually set to 3), a Net Line is drawn at the high or low of the first bar in the sequence. The penetration of this line create a buy or sell signal.

This buy or sell condition is active until the Time Out is exceeded. The Time Out is used for risk control by setting a predefined period or bars where the signals are valid. This helps users avoid irrelevant signals after an extended period.

Any sidebars (lower highs and higher lows than the preceding valid bar) will be ignored.

How to trade using Net Lines indicator

After a downtrend, if the price reaches above the Net Line, a buy signal will be generated. This suggests a potential reversal from a downtrend to an uptrend. After an uptrend, if the price drops below the Net Line, a sell signal will be given. This indicates a trend reversal from upward to downward.

Click here for more information about McClellan Oscillator.
Click here for more information
Click here for more information on MAAF
Click here for more information
Click here for more information.
Click here for more information.
Click here for more information.
See also MACD.
Risk Disclosure and Performance Disclaimer Statement
See also article by John Ehlers
See also Peter Martin’s page
See also TFS Volume Oscillator
See Ulcer Index for code