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
  • OC Histogram
  • OHLC
  • Omega Ratio
  • OnBalance Volume
  • OnBalance Volume Disparity Indicator
  • Open/Close Delta
  • Oscar
  • Parabolic SAR
  • Percent Change
  • Percentage Price Oscillator (PPO)
  • Percentage Trend
  • Percentage Trailing Stops
  • Percentage Volume Oscillator
  • Pesavento Patterns
  • Phase Calculation
  • Pivot Points
  • Pivot Point Average
  • Planets
  • Polarized Fractal Efficiency
  • Polynomial Regression Channel (PRC)
  • Positive Volume Index
  • Price Channel
  • Price Cycle Oscillator (PCO)
  • Price Labels
  • Previous Period Range
  • Projection Band UL
  • Projection Bandwidth
  • Projection Oscillator
  1. Studies

O - P

PreviousM - NNextQ - R

Last updated 5 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.

OC Histogram

The author of the OC Histogram is unknown. The Opening Closing Histogram is the difference of 2 exponential moving averages. The user may change the method (EMA), input1 (close), input2 (open) and period lengths. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using OC Histogram

The OC Histogram is a trending indicator and may be used in conjunction with other studies. Values below the zero line indicate a downward trend. Conversely, the values above represent an upward trend. No trading signals are calculated for this indicator.

Calculation

//input1 = price, user defined, default is closing price //input2 = price, user defined, default is opening price //method = moving average (ma), user defined, default is EMA //period1 = user defined, default is 10 //period2 = user defined, default is 10 //index = current bar number

ma1 = ma(method, index, period1, input1);
ma2 = ma(method, index, period2, input2);
PlotHist: oc = ma1 - ma2;

OHLC

OHLC plots the open (O), high (H), low (L), and previous close (C) values on the charts. Users can set a timeframe from daily readings to yearly readings.

How to trade using OHLC

OHLC can be used to identify trend directions and trend reversals, based on the Close and Open prices. In terms of trend momentums, when the Close price is higher than the Open price, it shows a price increase, reflecting a bullish trend. When the Close price is lower than the Open price, it indicates a downward price trend, which means a bearish momentum. In case the Close and Open prices are close, it signals a flat trend or consolidating market.

For reversals, after a downtrend, if the Close price is moving above the Open price and is higher than the previous bars, there might be a shift from a down to an uptrend. Conversely, if the Close price is moving below the Open price and is lower than the previous bars, it indicates a potential shift from an uptrend to a downtrend.

Traders can use the High and Low Points as Resistance and Support to make trading decisions. If the price reaches above the Resistance level (highest points, consistently), this signals a sell opportunity. Traders can consider buying if the price drops below the Support level (lowest points, consistently).

In addition, the distance between the highest and lowest prices of the day can reflect market volatility. If the distance is large, it indicates high volatility and, therefore, a riskier market for trading. Meanwhile, if the difference is small, it means a low volatility market and, therefore, less risky.

Omega Ratio

The Omega Ratio was authored by Frank A. Sortino. It evaluates how well an investor is compensated for the risk taken. The higher the Omega Ratio the better the instrument’s performance. The main ingredients are the current price and a prior price adjusted with the user-defined safe margin return. The user must select linear bars but may change the input (close), period length and margin value. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using the Omega Ratio

The Omega 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 //mar = margin, user defined, default is 5 percent //pow = power //index = current bar number

BarSize bar = getBarSize();
if (bar.getType() == BarSizeType.LINEAR) barMin = bar.getInterval();
else return;
minPerYr = 60*24*30*12;
priorP = price[index-p1];
mar = mar /100;  //convert percent to decimal
barsPerYr = minPerYr/barMin;
th = Math.pow((1 + (mar)), p1/barsPerYr) - 1; //minium acceptable return/period compounded 
ret = (price/priorP)-1; 
Plot: omega = omega(index, p1, th, ret);
....
Method omega(int index, int period, double th, Object key) 
iprice = 0, upSide = 0, dnSide = 0;
for (i = index-period+1; i lessThan=index; i++) 
    iprice = price[i];
    if (iprice lessThan th) 
        dnSide = dnSide + (th - iprice);
    endif
    if (iprice moreThan th) 
        upSide = upSide + (iprice - th); 
    endIf
endFor  
if (dnSide != 0) 
    return upSide / dnSide;
else return null;
endMethod
....

OnBalance Volume

OnBalance Volume (OBV) is based on the cumulative total volume and relates changing prices to volume. Volume on an up period (close is higher than the previous close) is added to the total, while volume on a down period is subtracted. This aggregate total represents the balance of buying versus selling pressure over time, with volume spikes or drops that might signal possible trend continuations or reversals. No user inputs are required in MotiveWave.

How To Trade Using OnBalance Volume

No trading signals are calculated for this indicator. However, the OBV can be used to confirm trends and divergence.

A rising OBV suggests strong buying pressure while a falling OBV implies selling pressure. When both OBV and the price direction are moving upward, this validates a bullish trend. Likewise, if both lines are moving downward, it confirms a bearish trend.

For divergence, if the price is moving upward but the OBV line is falling, a reversal from up to the downside might happen soon. This suggests a potential sell opportunity. If the price is dropping but the OBV is advancing upward, it signals an upcoming reversal to the upside and therefore, an opportunity to buy.

Sudden OBV peaks also indicate possible breakouts

Calculation

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

//index = current bar number //LT = less than, LOE = less or equal //MT = more than, MOE = more or equal

//Determine previous OBV
prev = ifNull(0, obv[index-1]);
value = prev;
if (getClose(index) MT getClose(index-1)) 
      value = prev + getVolume(index);
else if (getClose(index) MT getClose(index-1)) 
      value = prev - getVolume(index);
endIf
Plot: obv = value;    

OnBalance Volume Disparity Indicator

OnBalance Volume Disparity Indicator is authored by Phillip C. Holt, Stocks and Commodities Mag. 06/1996. Volume is not considered, but OnBalance uses Bollinger Band® differences in two time periods to orchestrate its oscillator value. Adjustable guides and a signal line are given to fine-tune the trading signals. The user may change the input (close), method (SMA), period lengths, standard deviation factor and guide values. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using OnBalance Volume Disparity Indicator

Adjust the top and bottom guides to control the quantity and quality of the trading signals. If the OBVDI is above the top guide and crosses below the AV, a sell signal will be generated. Conversely, if the OBVDI is below the bottom guide and crosses above the AV, a buy signal will be given. The .9 line divides the bulls (above) from the bears (below).

Calculation

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

bb[] = bollingerBands(index, period1, noStd, noStd, input);
bbDiff = bb[0] - bb[1];
perb = 0;
if (bbDiff != 0) perb = (price - bb[1])/ (bbDiff);
obv[] = bollingerBands(index, period1, noStd, noStd, perb);
bbDiff = obv[0] - obv[1];
obvPerb = 0;
if (bbDiff != 0) obvPerb = (perb - obv[1])/ (bbDiff);
plot1: obvDi = (1 + perb) / (1 + obvPerb);
plot2: av = ma(method, index, period2, obvDi);
//Signals
highSell = obvDi for last sell signal, reset to max_negative at each  buy signal;
lowBuy = obvDi for last buy signal, reset to max_positive at each sell signal;
sell = crossedBelow(OBVDI, AV) AND (obvDi moreThan topGuide) AND (obvDi moreThan highSell);
buy = crossedAbove(OBVDI, AV) AND (obvDi lessThan bottomGuide) AND (obvDi lessThan lowBuy);

Open/Close Delta

The Open/Close Delta displays the absolute difference between the open and close prices. A green bar is displayed if the close is higher than the open, otherwise the bar will be red. No user inputs are required for this indicator. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using Open/Close Delta

No trading signals are calculated for this indicator.

Calculation

//index = current bar number

iopen = getOpen(index);
iclose =getClose(index);
setColor(iclose-iopen);
Plot: delta = Math.abs(iclose - iopen);

Oscar

Oscar is an overbought or oversold oscillator. Oscar often coincides with a change in price direction. Set price bars to 1 day. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using Oscar

If the values are above the top guide line (70), they are considered overbought. Conversely, if the values are below the bottom guide line (30), they are considered oversold.

Oscar may be used in conjunction with other indicators; no trading signals are calculated by this study.

Calculation

//input = price, user defined, default is closing price //period = user defined, default is 8 //index = current bar number

lowest = lowest(index, period, LOW);
highest = highest(index, period, HIGH);
rough = ((price - lowest) / (highest - lowest)) * 100;
prevOscar = oscar[index-1];
Plot: oscar = ((prevOscar / 3) * 2) + (rough / 3);

Parabolic SAR

The Parabolic SAR (stop and reverse) was authored by J. Welles Wilder. It sets trailing price stops for long or short positions. Note: AF below stands for Acceleration Factor. The user may change the acceleration factors and value. This indicator’s definition is further expressed in the raw code given in the calculation below.

How To Trade Using Parabolic SAR

The Parabolic SAR may be used as an exit strategy. If a low is less than or equal to the pSAR a sell-to-exit (exit long) signal will be generated. Conversely, if the high is more than or equal to the pSAR a buy-to-cover (exit short) signal will be given

Calculation

//Initial Accelerator Factor = AF = user defined, default is .02 //Max Accelerator Factor = AFmax = user defined, default is .2 //Step = AFstep = user defined, default is .02 //index = current bar number

  protected void calculate(int index, DataContext ctx)
  
    DataSeries series=ctx.getDataSeries();
    if (index lessThan 1) return;
 
    double SAR=0; // Stop And Reverse
    double AF=getSettings().getDouble(INITIAL_AF, 0.02);
    double AFmax=getSettings().getDouble(MAX_AF, 0.2);
    double AFstep=getSettings().getDouble(STEP, 0.02);
    double EP=0; // Extreme Point 
    boolean isLong=false;
    double diff=0;
    double pSAR=0;
    Instrument instr=ctx.getInstrument();
    boolean latest=index == series.size() - 1;

    if (series.getDouble(index - 1, Values.PSAR) == null) 
      // first entry point, calculate the first SAR 
      isLong=series.getClose(index) moreThan series.getClose(index - 1);
      SAR=isLong ? series.getLow(index - 1) : series.getHigh(index - 1);
      if (isLong) EP=Util.max(series.getHigh(index), series.getHigh(index - 1));
      else EP=Util.min(series.getLow(index), series.getLow(index - 1));
      pSAR=SAR;
    else 
      pSAR=series.getDouble(index - 1, Values.PSAR);
      AF=series.getDouble(index - 1, Values.AF);
      EP=series.getDouble(index - 1, Values.EP);
      isLong=series.getBoolean(index - 1, Values.LONG);

      // Check for stop and reversals 
      // Have we penetrated the pSAR? 
      double low=series.getLow(index);
      double high=series.getHigh(index);
      double oldSAR=pSAR;

      if (isLong AND low lessOrEqual instr.round(pSAR)) 
        // Stop and Reverse 
        pSAR=EP;
        EP=series.getLow(index);
        isLong=false;
        AF=getSettings().getDouble(INITIAL_AF, 0.02);
        series.setBoolean(index, Signals.SAR_LONG, true);
        if (!latest) 
          ctx.signal(index, Signals.SAR_LONG, get("SIGNAL_SAR_LONG", instr.format(low), instr.format(oldSAR)), low);
        end
      end
      else if (!isLong AND high moreOrEqual instr.round(pSAR)) 
        pSAR=EP;
        EP=series.getHigh(index);
        isLong=true;
        AF=getSettings().getDouble(INITIAL_AF, 0.02);
        series.setBoolean(index, Signals.SAR_SHORT, true);
        if (!latest) 
          ctx.signal(index, Signals.SAR_SHORT, get("SIGNAL_SAR_SHORT", instr.format(high), instr.format(oldSAR)), high);
        end
      end

      // Compute the next SAR 
      if (isLong) 
        if (series.getHigh(index) moreThan EP) 
          if (AF lessThan AFmax) AF+=AFstep;
          EP=series.getHigh(index);
        end
        diff=Math.abs(EP - pSAR);
        SAR=pSAR + AF * (diff); 
        if (SAR moreThan series.getLow(index) OR SAR moreThan series.getLow(index - 1)) 
          SAR=Math.min(series.getLow(index), series.getLow(index - 1));
        end
      end
      else 
        if (series.getLow(index) lessThan EP) 
          if (AF lessThan AFmax) AF+=AFstep;
          EP=series.getLow(index);
        end
        diff=Math.abs(EP - pSAR);
        SAR=pSAR - AF * (diff); 
        if (SAR lessThan series.getHigh(index) OR SAR lessThan series.getHigh(index - 1)) 
          SAR=Math.max(series.getHigh(index), series.getHigh(index - 1));
        end
      end
    end

    series.setDouble(index, Values.PSAR, SAR);
    series.setDouble(index, Values.AF, AF);
    series.setDouble(index, Values.EP, EP);
    series.setBoolean(index, Values.LONG, isLong);
    series.setComplete(index);
  endMethod

Percent Change

Percent Change by Omega Research 1997. It is a running total of the percentage change in the closing price. The user may change the input (close). This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using Percent Change

The Percent Change may be used in conjunction with other indicators. No trading signals are given.

Calculation

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

prevP = price[index-1];
prevPcc = pcc[index-1];
if (prevP - 1 == 0) return;
Plot: pcc = prevPcc + price / (prevP - 1);

Percentage Price Oscillator (PPO)

The Percentage Price Oscillator (PPO) is the percentage form of the Moving average convergence/divergence (MACD), both were created by Gerald Appel. While the MACD expresses the difference between two moving averages as an absolute value, PPO plots this difference as a percentage. When comparing two instruments that differ significantly in price, the MACD will also reflect the large difference. The PPO smooths out the impact of large differences in price, making it more comparable for different securities. While the PPO and MACD are mostly identical in shape, their calculations create minor variations in the signals.

How to trade using PPO

PPO is a momentum oscillator that helps traders identify market trends, potential trading signals, or market volatility. When the PPO line crosses above the zero line (PPO > 0), it indicates an upward trend and therefore, an opportunity to buy. When the PPO line crosses below the zero line (PPO < 0), it signals a downtrend and therefore an opportunity to sell.

In addition, the percentage values and range of a PPO chart can reflect market volatility and can be used to compare instruments. A higher PPO value or range suggests higher volatility.

PPO can be used in conjunction with other indicators to confirm signals and trends.

Percentage Trend

The Percentage Trend was described in the Russian Modern Trading magazine in 2001. It defines a trend while filtering corrections that do not exceed a certain level and switches direction only when the overall tendency changes. The user may change the period and percent K values. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using Percentage Trend

No trading signals are calculated for this indicator.

Calculation

//Max_per = max period, user defined, default is 20 //K = percent K, user defined, default is 15 //MT = more than, MOE = more or equal //LT = less than, LOE = less or equal

C = close;
Trend = C;
Period = 0;  
prevC = C;
for(int i = 1; i LT size(); i++) 
    prevC = C;
    C = getClose(i);
    //SetUp Period When New Trend Begin
    if ( (prevC LOE Trend AND C MT Trend)  OR (prevC MOE Trend AND C LT Trend) ) 
        Period = 0; 
    endIf
    if (Period LT Max_per ) //Counting UpTrends with dynamic period
        if (C MT Trend) 
            Period = Period +1;
            high = C;
            for(int j = i-Period; j LOE i; j++)
                jclose = getClose(j);
                if (jclose MT high) high = jclose;
            endFor
            Trend = high*(1 - (K/100));
        endIf
        //Counting DownTrends with dynamic period
        if (C LOE Trend) 
            Period = Period + 1;
            ilow = C;
            for(int j = i-Period; j LOE i; j++) 
                jclose = series.getClose(j);
                if (jclose MT low) low = jclose;
            endFor
        endIf
        Trend = ilow*(1 + (K/100));
    else  //Counting UpTrends with constant period
        if (C MT Trend) 
            ihigh = C;
            for(int j = i-Max_per; j LOE i; j++) 
                jclose = getClose(j);
                if (jclose MT high) high = jclose;
            endFor
            Trend = ihigh*(1 - (K/100));
        endIf
        //Counting DownTrends with constant period
        if (C LOE Trend) 
            ilow = C;
            for(int j = i-Max_per; j LOE i; j++) 
                jclose = getClose(j);
                if (jclose LT low) low = jclose;
             endFor
            Trend = ilow*(1 + (K/100));
            TP = Period;;
            Plot: Trend;
        endif
    endIf
endFor          

Percentage Trailing Stops

Percentage Trailing Stops identifies stop-loss exit points for long and short positions. Select Show Index to find entry index number, index numbers are shown in multiples of five. The entry index number may also be found by opening the Cursor Data window. The approximate entry price is taken as the closing price at the entry index. For long positions, the stop is placed below the entry price (high-(factor*price/100) and adjusts upwards if the price rises. For short positions, the stop is placed above the entry price (low+(factor*low/100) and adjusts downwards if the price falls. The user may change the position (long), index number, show index option and percent factor. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using Percentage Trailing Stops

Percentage Trailing Stops are designed to aid in stop loss exit decisions. For long positions, if a low and a previous low are below the stop loss line a sell signal is generated. Conversely for short positions if a high and a previous high are above the stop short line a buy-to-cover signal will be given.

Calculation

//position = pos, user defined, default is long //Index = index number, user defined, default is 100 //show index = showI, user defined, default is false //percent factor = pct, user defined, default is 10 //enterP = entry price //index = current bar number, prev = previous //shortP = short position, longP = long position

longP = pos == "Long";
shortP = pos == "Short";
pct = pct / 100;  //change from percent to decimal
highest = 0, lowest = 0;
enterP = CLOSE;
enterP = round(enterP, 2);
if (index == ind)
    if (longP)
        hhLl[index-1] = enterP;
        stop[index-1] = high - (pct * high);
    endIf
if (shortP)
        hhLl[index-1] = enterP;
        stop[index-1] = low + (pct * low);
    endIf
endIf
prevHH = ifNull(enterP, hhLl[index-1]);
prevLL = ifNull(enterP, hhLl[index-1]);
pSl = ifNull(enterP, stop[index-1]);
pSS = ifNull(enterP, stop[index-1]);
stopL = 0;
stopS = max_value;
if (longP)
    stopL = pSL;
    highest = prevHH;
    if (high moreThan prevHH)
        stopL = high - (pct * high);  //set new higher stop
        highest = high;  //set new highest
    endIf
    hhLl = highest;
    stop = stopL;
endIf
if (shortP)
    stopS = pSS;
    lowest = prevLL;
    if (low lessThan prevLL)
        stopS = low + (pct * low);  //set new lower stop
        lowest = low; //set new lowest
    endIf
hhLl = lowest;
stop = stopS;
endIf
 //Signals
prevL = low[index-1];
prevH = high[index-1];
sell = prevL moreThan stopL AND low lessThan stopL;
buy = prevH lessThan stopS AND high moreThan stopS;

Percentage Volume Oscillator

The Percentage Volume Oscillator (PVO) shows the percentage difference between two moving averages of volume. This study takes three different periods. The first two define the two moving averages that are being compared. The last period is used to smooth the difference and form the signal line. A histogram of their difference (PVO minus signal) is also given. The user may change the inputs (EMA, SMA) and period lengths. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using Percentage Volume Oscillator

No trading signals are calculated for this indicator.

Calculation

//method1 = moving average (ma), user defined, default is EMA //method2 = moving average (ma), user defined, default is SMA //period1 = user defined, default is 12 //period2 = user defined, default is 26 //signalPeriod = user defined, default is 9 //index = current bar number

MA1 = ma(method1, index, period1, VOLUME);
MA2 = ma(method1, index, period2, VOLUME);
Plot1: PVO = ((MA1 - MA2)/MA2) * 100;
//Calculate moving average of PVO (signal line)
Plot2: signal = ma(method2, index, signalPeriod, PVO);
PlotHist3: hist = PVO - signal;

Pesavento Patterns

Pesavento Patterns are based on a number series developed by Larry Pesavento and are described in his book "Profitable Patterns for Stock Trading". Pesavento Patterns are developed from Fibonacci ratios and other geometric price patterns. Larry Pesavento believes that certain price patterns are repeated over time which could help provide insights into potential price movements. Pesavento's patterns are similar to other harmonic trading patterns but focus primarily on Fibonacci retracements and extensions, and usually offer clear entry, exit, and stop-loss levels.

Pesavento Patterns in MotiveWave are used in conjunction with the ZigZag study. The ZigZag charting tool filters out noises or small movements in price to focus on major trends. Only significant swing points are shown in a ZigZag chart, often triggered when the prices reach a specific percentage (error margin). By integrating the ZigZag study with Pesavento Patterns, the price swings and potential reversal prices are highlighted corresponding to the Fibonacci levels.

Any ZigZag values within the chosen Error Percent will be highlighted with the chosen Pesavento Label Color. The Error Percent acts as the tolerance level to account for the difference between the actual value and the estimated value. In the context of Pesavento Patterns, it is the difference between the actual price movements and the ideal Fibonacci ratios. When a price swing from a ZigZag chart is within an Error Percent above or below a chosen Pesavento ratio, it is considered a valid pattern and will be pinpointed with color.

In addition, Pesavento Patterns can be used in conjunction with Pivot Points for more information about potential reversals.

How to trade using Pesavento Patterns

The highlighted Pesavento Labels indicate the alignments of price swings and Pesavento's key levels. Therefore, users can look at these labels to identify reversal signals, which suggest potential selling and buying opportunities.

Traders set up potential entries and exits or stop-loss levels based on retracements and extensions. When the price approaches a highlighted label and has reversal signs, traders can consider entering a trade. Traders can also set a stop-loss level above the Fibonacci level or Pivot Point to identify potential losses in case the price keeps advancing in one direction

Phase Calculation

Phase Calculation was authored by John F. Elders in the Stocks and Commodities Magazine 11/1996. Phase Calculation manipulates the price over a period with complex number information but, real or imaginary, degree by degree, the final phase is found. 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 Phase Calculation

Phase Calculation 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 15 //sin = sine, cos = cosine, tan = tangent //abs = absolute value, asin = arc sine, atan = arc tangent //imagP = imaginary part, realP = real part //index =current bar number, LOE = less or equal

weight = 0;
realP = 0;
imagP = 0;
j = 0;
radians = 0;
phase = 0;
for i = index - period + 1; i LOE index; i++)
    weight = price[i];
    radians = toRadians(360 * j / period);
    realP = realP + cos(radians) * weight;
    imagP = imagP + sin(radians) * weight;
    j++;
endFor
if (abs(realP) moreThan .001) phase = toDegrees(atan(imagP/realP));
else phase = 90 * toDegrees(asin(imagP));
if (realP lessThan 0) phase = phase + 180;
phase = phase + 90;
if (phase lessThan 0) phase = phase + 360;
if (phase moreThan 360) phase = phase - 360;
Plot: phase;

Pivot Points

Pivot Point (PP) and Pivot Point Average (PPA) were authored by Jayanthi Gopalakrishnan in the Stocks and Commodities Magazine 02/2000. Pivot points are often used as a predictive indicator to identify support and resistance points based on the previous time frame values (usually the previous day’s high, low and closing prices). The user may change the type (Classic), show all points option, and show labels option. This indicator’s definition is further expressed in the code given in the calculation below.

How To Trade Using Pivot Points

Pivot Points may identify support and resistance points and be used in conjunction with other studies. No trading signals are given for this indicator.

Calculation

//type = user selection, default is Classic //types are Classic,Woodie,Camarilla,Fibonacci,Fib Zone,Fib Zone2 //show all points = user selection, default is false //show labels = user selection, default is true

Code may be available on request.

Pivot Point Average

Pivot Point (PP) and Pivot Point Average (PPA) were authored by Jayanthi Gopalakrishnan in the Stocks and Commodities Magazine 02/2000. The PP is calculated from different combinations of current and previous, highs, lows, opens and closes. The particular combination is dependent upon a user input called the price method. The signal line is the (PPA) which is a moving average of the PP. The user may change the method (SMA), period length and price method. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using Pivot Point Average

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

Calculation

//method = moving average, user defined, default is SMA //period = user defined, default is 3 //priceM = price Method, user defined, default is 1 //prev = previous, index = current bar number

prevH = high[index-1];
prevL = low[index-1];
prevC = close[index-1];
pp = (prevH + prevL + prevC) / 3;
if (priceM == 1) pp = (prevH + prevL + prevC) / 3;
if (priceM == 2) pp = (prevH + prevL + prevC + open) / 4;
if (priceM == 3) pp = (prevH + prevL + open) / 3;
plot1: pp;
plot2: ppav = ma(method, period, pp);
//Signals
sell = crossedAbove(PP, PPAV);
buy = crossedBelow(PP, PPAV);

Planets

Besides technical analysis tools, MotiveWave also provides charts that are based on planetary positions and Moon Phases for astro traders. The Planets chart displays the positions of eight planets in the solar system: Mercury (☿), Venus (♀), Mars (♂), Jupiter (♃), Saturn (♄), Uranus (♅), Neptune (♆), Pluto (♇). The chart marks important planetary alignments with Earth and the Sun, known as conjunctions, represented by the planet symbol and marked at 0°. A conjunction occurs when Earth, the Sun, and a planet align.

Optional marks are given for specific angular aspects, such as sextile ( at 60°, 120°, 180°, 240°, 300°) and quadrature (at 90°, 180°, 270°). These angles indicate major astrological aspects that might influence market events

The calculations incorporate the Synodic periods of the planets. These periods are the time for a planet to complete a cycle ( re-alignment with the Sun and the Earth). The Synodic periods are as follows: Mercury-115.88, Venus-583.9, Mars-779.9, Jupiter-398.9, Saturn-378.1, Uranus-369.7, Neptune-367.5 and Pluto-366.7 days.

Traders can detect potential signals for buying or selling using Planets. They might also indicate patterns or correlations between price movements and celestial events.

Planets study may be used in conjunction with the Moon Phrases or with other technical analysis tools for more precise predictions and confirmation.

Polarized Fractal Efficiency

Polarized Fractal Efficiency was authored by Omega Research 1997. The PFE uses prices on several past price bars. They are powered, rounded, square rooted, feed their past values and finally formed into an oscillator. 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 Polarized Fractal Efficiency

Adjust the top and bottom guides to control the quantity and quality of the trading signals. If the ema peaks above the top guide a sell signal will be generated. Conversely, if the ema troughs below the bottom guide a buy signal will be given. The zero line divides the bears above from the bulls below.

Calculation

//input = price, user defined, default is close //period = user defined, default is 9; //pow = power, sqrt = square root //prev = previous, index = current bar number //LOE = less or equal, MOE = more or equal

pfe = 0;
c2c = 0;
counter = 0;
fracEff = 0;
ema = 0;
prevEma = 0;
priceCM1 = 0;
priceC = 0;
priorPrice = price[index-period];
pfe = Math.sqrt(Math.pow((price - priorPrice), 2) + 100);
for (counter = 1; counter LOE period; counter++)
    priceCM1 = price[index-counter-1];
    priceC = price[index-counter];
    c2c = c2c + Math.sqrt(Math.pow(priceCM1 - priceC, 2) + 1);
endFor
if (price - priorPrice moreThan 0) fracEff = Math.round((pfe / c2c) * 100);
else fracEff = Math.rint(-(pfe / c2c) * 100);
prevEma = ifNull(fracEff, ema[index-1]);   //returns fracEff on first try
Plot: ema = Math.rint((fracEff * 0.333) + prevEma * (1 - 0.333));
 //Signals
prevEma = ema[index-1];
sell = (ema moreThan topGuide) AND (prevEma MOE ema) AND (ema moreThan highSell);
buy = (ema lessThan bottomGuide) AND (prevEma LOE ema) AND (ema lessThan lowBuy); 

Polynomial Regression Channel (PRC)

How to trade using the Polynomial Regression Channel

Traders can use the PRC to identify trends and potential buy/sell signals.

The overall trend direction is reflected through the slope of the channel. An upward slope illustrates an uptrend while a downtrend shows that the trend is moving downward. If the curve line is flat, it means there might be a reversal trend or the market is in a consolidating condition.

In terms of buy/sell signs, if the price reaches above the upper channel (overbought), traders might consider selling, especially if the trend direction is moving downward. When the price drops below the lower channel (oversold), it signals a good time for buying, especially if the price is moving upward.

The PRC may be used in conjunction with other indicators, such as RSI or MACD for more reliable readings of signals and trends.

Positive Volume Index

The Positive Volume Index (PVI) was first introduced by Norman Fosback. PVI changes in the periods in which the volume has increased compared to the previous period. The belief behind this indicator is that as volume increases, the investment community is unified with the current direction of the market. No user input is required. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using Positive Volume Index

No trading signals are calculated for this indicator.

Calculation

//MT = more than, prev = previous //index = current bar number

prev = ifNull(1, val[index-1]);
value = prev;
if (getVolume(index) MT getVolume(index-1)) 
      value = prev + ((getClose(index) - getClose(index-1))/getClose(index-1))*prev;  
endIf
Plot: value;

Price Channel

The Price Channel forms boundaries above and below the price line and can be used as indicators of volatility. The upper band indicates the highest price over the past top period, and the lower band indicates the lowest price over the past bottom period. The user may change either or both of the period lengths. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using Percentage Trend

No trading signals are calculated for this indicator.

Calculation

//topPeriod = user defined, default is 20 //bottomPeriod = user defined, default is 20

Plot1: top = highest(index, topPeriod, HIGH);
Plot2: bottom = lowest(index, bottomPeriod, LOW);

Price Cycle Oscillator (PCO)

The Price Cycle Oscillator (PCO) was authored by Larry Williams. The PCO uses a Moving Average of the close minus the low, divided by the Average True Range times 100. The user may change the inputs (close, low), method (SMA), period length and guide values. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using the Price Cycle Oscillator

No trading signals are calculated for this indicator.

Calculation

//input1 = price, user defined, default is closing price //input2 = price, user defined, default is low price //method = moving average (ma), user defined, default is SMA //avPeriod = user defined, default is 22 //atrPeriod = user defined, default is 22 //index = current bar number

price1 = input1[index];
price2 = input2[index];
cl = price1 - price2;  
avg = ma(method, index, avPeriod, CL);
//Average True Range (atr)
atr = sma(index,  atrPeriod, TR);
Plot: pco = (avg / atr) * 100.0;

Price Labels

Price Labels displays price labels for the highest high over the range (index – high_period, index + high_period) and the lowest low over the range (index – low_period, index + low_period). 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 Price Labels

No trading signals are calculated for this indicator.

Calculation

//period1 = user defined, default is 9 //period2 = user defined, default is 26 //ext bars = user defined, default is 20 //enabled = user defined, default is false

Code may be available on request.

Previous Period Range

Previous Period Range (PPR) displays the range of the previous period (daily by default) as an overlay on the current period. This is often used to display the previous day's high and low as vertical lines on the current day’s price action (as support/resistance lines).

There are several options available for this overlay:

Projection Band UL

The Projection Band UL was authored by Mel Widner in the Stocks and Commodities Mag. 07/1995. It uses the linear regression slope (m) in the line equation (y=a+mx). It displays 2 paths, one based on the high price(UB), the other on the low price(LB). The user may modify the period (14). This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade using Projection Band UL

Adjust the bands to control the quantity and quality of the trading signals. If a high goes above the upper band, a sell signal is generated. Conversely, if a low goes below the lower band, a buy signal is given.

Calculation

//period = user defined, default is 14 //prev = previous //index = current bar number //m = slope in line equation, y = a + mx //LOE = less or equal, MOE = more or equal

pu = 0, pl = MAX_VALUE;
mHigh = linRegLine(index, period, high, 0)[1];
mLow = linRegLine(index, period, low, 0)[1];
count = 0;
for (int i = (index-period+1); i LOE index; i++)  //move back 1 period
    prevHigh = high[i-1];
    prevLow = low[i-1];
    vHigh = prevHigh + (mHigh * (count));
    vLow = prevLow + (mLow * (count));
    if (vHigh moreThan pu) pu = vHigh;
    if (vLow lessThan pl) pl = vLow;
    count++;
end;
Plot1: pl;
Plot2: pu;
 //Signals
sell = high moreThan pu;
buy = low lessThan pl;

Projection Bandwidth

Projection Bandwidth by Mel Widner, Stocks and Commodities Mag. 07/1995, uses the Linear Regression slope, previous highs and lows in its calculation. The user may change the period length. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using Projection Bandwidth

Projection Bandwidth may be used in conjunction with other indicators. No trading signals are given

Calculation

//period = user defined, default is 14 //prev = previous, index = current bar number //LOE = less or equal

mLow = linRegLine(period, low)[1]; //returns the slope (m) of Linear Regression line
mHigh = linRegLine(period, high)[1]; 
count = 0;
pbw = 0, pu = 0, pl = Double.MAX_VALUE;
for (i = (index-period + 1); i LOE index; i++) //move back 1 period
    prevHigh = high[i-1];
    prevLow = low[i-1];
    vHigh = prevHigh + (mHigh * (count));
    vLow = prevLow + (mLow * (count));
    if (vHigh moreThan pu) pu = vHigh;
    if (vLow lessThan pl) pl = vLow;
    count++;
endFor
Plot: pbw = 200 * (pu - pl) / (pu + pl);

Projection Oscillator

The Projection Oscillator (PO) was authored by Mel Widner, Stocks and Commodities Mag. 07/1995. The PO uses the Linear Regression slope, along with highs and lows in its calculation. The user may change the method (EMA) and period lengths. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using Projection Oscillator

Trading signals are given when the pbo crosses the signal line. If the pbo crosses above (upward movement) a buy signal will be generated. Conversely, if the pbo crosses below (downward movement) a sell signal will be given.

Calculation

//method = user defined, default is EMA //pboPeriod = user defined, default is 14 //sigPeriod = user defined, default is 3 //index = current bar number, LOE = less or equal

mHigh = linRegLine(period, high)[1];   //returns the slope (m) of Linear Regresion line
mLow = linRegLine( period, low)[1];
count = 0;
pbw = 0, pu = 0, pl = Double.MAX_VALUE;
for (i = (index-pboPeriod + 1); i LOE index; i++)   //move back 1 period
    high = high[i];
    low = low[i];
    vHigh = high + (mHigh * (count));
    vLow = low + (mLow * (count));
    if (vHigh moreThan pu) pu = vHigh;
    if (vLow lessThan pl) pl = vLow;
    count++;
endFor
Plot1: PBO = 100 * (price - pl) / (pu - pl);
Plot2: SIG = ma(method, sigPeriod, pbo);
buy = crossedAbove(PBO, SIG);
sell = crossedBelow(PBO, SIG);

A Polynomial Regression Channel (PRC) is a dynamic and sophisticated version of the , where it uses a polynomial curve instead of a linear one to represent non-linear price movements. The Polynomial Regression value is an attempt to model the Data Series. By adjusting the period and degree of the polynomial curve, traders can fine-tune the PRC to better match the price movements. The higher the degree is set, the more complicated the channel curves can present. Similar to the Linear Regression Channel, the PRC consists of a central polynomial regression line and two parallel channels, representing upper and lower standard deviation levels. These Upper and Lower channels present potential overbought and oversold conditions.

See Omega Ratio
See also Sortino Ratio
Click here for more information.
Click here for more information.
Click here for more information
Click here for more information about Polynomial Regression
Risk Disclosure and Performance Disclaimer Statement
Linear Regression Channel