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
  • Kase Indicator
  • Kaufman Adaptive Moving Average
  • Keltner Channel
  • Kirshenbaum Bands
  • Klinger Volume Oscillator
  • Know Sure Thing
  • Laguerre Filter
  • Laguerre Filter Adaptive
  • Laguerre RSI
  • Laguerre Combo
  • LBR Paint Bars
  • Linear Regression
  • Linear Regression Curve
  • Linear Regression Channel
  • Linear Regression Slope
  1. Studies

K - L

PreviousI - JNextM - N

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.

Kase Indicator

Kase Indicator by Cynthia Kase uses volume and Average True Range in its formula. 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 Kase Indicator

The Kase Indicator may be used in conjunction with other indicators. No trading signals are given.

Calculation

//period = user defined, default is 10 //av = average //sqrt = square root //atr = average true range //moreT = moreThan, lessT = lessThan //index = current bar number

priorHigh = high[index-period];
priorLow = low[index-period]);
avVol = sma(period, index, volume);
avTR = atr(period);
kUp = kUp[index-1];
if (avTR moreT 0) kUp = (priorHigh/low) / (avVol * sqrt(period));
kDown = kDown[index-1];  //previous Kdown
if (avTR moreT 0) kDown = (high/priorLow) / (avVol * sqrt(period));
plot1 = null;
if (kUp moreT kDown) plot1 = low;
plot2 = null;
if (kUp lessT kDown) plot2 = high;
plot3 = null;
if (kUp == kDown) plot3 = (high + low) / 2;
Plot1: plot1;
Plot2: plot2;
Plot3: plot3;

Kaufman Adaptive Moving Average

The Kaufman Adaptive Moving Average was created, not surprisingly, by Perry Kaufman. The KAMA takes into consideration the noise of the market. This version of KAMA uses smoothing constants of 2 and 30 for the periods of the shortest and longest moving averages respectively. The user may change the input (close), period length and shift number. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using the Kaufman Adaptive Moving Average

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

Calculation

//input = price, user defined, default is close //period = user defined, default is 20 //shift = user defined, default is 0 //kama = kaufman adaptive moving average //index = current bar number

kama = kama(index+shift,period,input);

Keltner Channel

The Keltner Channel is named after Chester W. Keltner. In this modern version of the Keltner Channel, the middle line is an exponential moving average (EMA) of the given input. The upper and lower bands are a set distance that is a multiple (range attribute) of the Average True Range from the middle line. The user may change the input (close), period lengths and range attributes. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using Kelter Channel

No trading signals are currently calculated for Keltner Channel.

Calculation

//input = price, user defined, default is close //middlePeriod= user defined, default is 20 //atrPeriod= user defined, default is 10 //upperRange = user defined, default is 2 //lowerRange = user defined, default is 2 //ma = moving average, EMA = exponential moving average //index = current bar number, atr = average true range

atr = atr(index, atrPeriod);
Plot2: ma = ma("EMA", index, middlePeriod, input);
Plot1: ma + (upperRange * atr);
Plot3: ma - (upperRange * atr);

Kirshenbaum Bands

The Kirshenbaum Bands were authored by Paul Kirshenbaum. Their range is based on standard error as calculated from a hypothetical linear regression line. This range is added to and subtracted from an exponential moving average of the price to produce a top and a bottom band. The user may change the input (close), 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 Kirshenbaum Bands

The Kirshenbaum Bands may be used in conjunction with other studies. No trading signals are calculated for this indicator.

Calculation

//input = price, user defined, default is closing price //method = moving average (ma), user defined, default is EMA //period1 = user defined, default is 30 //period2 = user defined, default is 20 //noSdDev = number of standard deviations, user defined, default is 1

//stdErr = standard error, index = current bar number

ma = ma(method, index, period1, input);
sdErr = stdErr(period2, index, input);
topBand = ma + (sdErr * noSdDev);
bottBand = ma - (sdErr * noSdDev);

Klinger Volume Oscillator

The Klinger Volume Oscillator was developed by Stephen J. Klinger. It is a conformation indicator. It uses high, low, close and volume to create a volume force. This volume force (VF) is then turned into an oscillator by taking a fast EMA of VF and subtracting a slow EMA of VF. A signal line (KOS), which is an EMA of the Klinger Oscillator (KO), is plotted to trigger trading signals. 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 Klinger Volume Oscillator

Although signals are generated as shown in the calculation, the Klinger Volume Oscillator is considered a conformation indicator and should be used in conjunction with other indicators.

Calculation

//method = moving average (ma) user defined, default is EMA //fastPeriod = user defined, default is 34 //slowPeriod = user defined, default is 55 //signalPeriod = user defined, default is 13 //index = current bar number

lastCm = CM[index-1];
lastHigh = high[index-1];
lastLow = low[index-1];
lastClose = close[index-1];
lastDm = lastHigh - lastLow;
lastTrend = TREND[index-1];
if (lastTrend == null) lastTrend = -1;
if ((high + low + close) moreThan (lastHigh + lastLow + lastClose)) TREND = 1;
else TREND = -1;
dm = high - low;
if (TREND == lastTrend) CM = lastCm + dm;
else CM = lastDm + dm;
if (CM == 0) temp = -2;
else temp = abs(2 * (dm/CM -1));
VF = volume * temp * TREND * 100;
koFast = ma(method, index, fastPeriod, VF);
koSlow = ma(method, index, slowPeriod, VF);
Plot1: KO = koFast - koSlow;
Plot2: KOS = ma(method, index, signalPeriod, KO);
//Signals
buy = crossedAbove(KO,KOS);
sell = crossedBelow(KO, KOS);

Know Sure Thing

Know Sure Thing was developed by Martin J. Pring in the 1990s. The KST uses four rate of change values to determine the trend of the market. The user may change the input (close), methods (SMA, EMA) and multiple period lengths. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using Know Sure Thing

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

Calculation

//input = price, user defined, default is closing price //method1 = moving average (ma), user defined, default is SMA //method2 = moving average (ma), user defined, default is EMA //signalPeriod = user defined, default is 8 //ma1 default = 10, r1 default = 10, w1 default = 1 //ma2 default = 10, r2 default = 15, w1 default = 2 //ma3 default = 10, r3 default = 20, w1 default = 3 //ma4 default = 15, r4 default = 30, w1 default = 4 //index = current bar number, roc = rate of change

roc1 = roc(index, r1, input)*100);
roc2 = roc(index, r2, input)*100);
roc3 = roc(index, r3, input)*100);
roc4 = roc(index, r4, input)*100);
KST = ma(method1, index, ma1, ROC1)*w1 + ma(method1, index, ma2, ROC2)*w2 +
          ma(method1, index, ma3, ROC3)*w3 + ma(method1, index, ma4, ROC4)*w4;
SIGNAL = ma(method2, index, signalPeriod, KST);
//Signals
buy = crossedAbove(KST, SIGNAL);
sell = crossedBelow(KST, SIGNAL);

Laguerre Filter

The Laguerre Filter (LF) was authored by John Ehlers. The LF requires the current price, three prior prices, a user-defined factor called alpha and a good deal of feedback to fill its calculation. The user may change the input (midpoint) and the alpha factor. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using the Laguerre Filter

The Laguerre 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 //alpha = user defined factor, default is 0.2 //prev = previous, index = current bar number

priorP1 = price[index-1];
priorP2 = price[index-2];
priorP3 = price[index-3];
prevL0 = ifNull(price, lo[index-1]);  //feedback ingredent
prevL1 = ifNull(price, l1[index-1]);  //feedback ingredent
prevL2 = ifNull(price, l2[index-1]);  //feedback ingredent
prevL3 = ifNull(price, l3[index-1]);  //feedback ingredent
l0 = alpha*price + (1-alpha)*prevL0;
l1 = -(1 - alpha)*l0 + prevL0 + (1 - alpha)*prevL1;
l2 = -(1 - alpha)*l1 + prevL1 + (1 - alpha)*prevL2;
l3 = -(1 - alpha)*l2 + prevL2 + (1 - alpha)*prevL3;
Plot1: filt = (l0 + 2*l1 + 2*l2 + l3) / 6;
Plot2: fir = (price + 2*priorP1 + 2*priorP2 + priorP3) / 6;

Laguerre Filter Adaptive

The Laguerre Filter Adaptive (LFA) was authored by John Ehlers. The LFA requires the highest and lowest of the difference of current price and previous price, some averaging, and a good deal of feedback to fill its calculation. The user may change the input (midpoint) and the period lengths. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using the Laguerre Filter Adaptive

The Laguerre Filter Adaptive 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 //period1 = p1 = user defined, default is 20 //period2 = p2 = user defined, default is 5 //abs = function, returns absolute value of argument //median = function, returns price at middle of period //diff = difference, prev = previous //index = current bar number

prevF = ifNull(price, filt[index-1]);
diff = Math.abs(price - prevF);
hh = highest(p1, DIFF);
ll = lowest(p1, DIFF);
if (hh - ll != 0) mid = (diff-ll) / (hh - ll);
if (hh - ll != 0)
    alpha = median(p2, MID);  //returns price at middle of p2
endIf
prevL0 = ifNull(price, LO[index-1]);
prevL1 = ifNull(price, L1[index-1]);
prevL2 = ifNull(price, L2[index-1]);
prevL3 = ifNull(price, L3[index-1]);
l0 = alpha*price + (1-alpha)*prevL0;
l1 = -(1 - alpha)*l0 + prevL0 + (1 - alpha)*prevL1;
l2 = -(1 - alpha)*l1 + prevL1 + (1 - alpha)*prevL2;
l3 = -(1 - alpha)*l2 + prevL2 + (1 - alpha)*prevL3;
Plot: filt = (l0 + 2*l1 + 2*l2 + l3) / 6;

Laguerre RSI

Laguerre RSI (LRSI) was authored by John Ehlers in his article Time Warp – Without Space Travel. The Relative Strength Index (RSI) itself, was authored by Wells Wilder. The LRSI uses the current price, a user defined gamma factor and plenty of feedback to calculate its final value. The user may change the input (close) and the gamma factor. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using the Laguerre RSI

The Laguerre RSI may be used in conjunction with other studies. No trading signals are calculated.

Calculation

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

prevL0 = ifNull(price, lo[index-1]);  //feedback ingredent
prevL1 = ifNull(price, l1[index-1]);  //feedback ingredent
prevL2 = ifNull(price, l2[index-1]);  //feedback ingredent
prevL3 = ifNull(price, l3[index-1]);  //feedback ingredent

l0 = (1 - gamma) * price + gamma * prevL0;
l1 = -gamma *l0 + prevL0 + gamma * prevL1;
l2 = -gamma * l1 + prevL1 + gamma * prevL2;
l3 = -gamma * l2 + prevL2 + gamma * prevL3;

if(l0 moreOrEqual l1) cu = l0 - l1;
else cd = l1 - l0;

if(l1 moreOrEqual l2) cu = cu + l1 - l2;
else cd = cd + rl2 - l1;

if(l2 moreOrEqual l3) cu = cu + l2 - l3;
else cd = cd + l3 - l2;

if ( cu + cd notEqual 0.0) rsi = cu / (cu + cd);
plot rsi;

Laguerre Combo

How To Trade Using the Laguerre Combo

No trading signals are calculated.

LBR Paint Bars

LBR Paint Bars changes the color of the price bars depending on the trend direction. The trend is determined by the position of 2 volatility lines. The calculation of these lines uses a moving average of the Average True Range and applies it to (plus or minus) the highest highs and the lowest lows. The And Or option refers to the specific logic used see the code for details. The user may change the input (close), method (SMA), factor, period lengths and the and or option. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using LBR Paint Bars

The LBR Paint Bars may be used with other indicators. No signals are given for this indicator.

//input = price, user defined, default is closing price //method = moving average (MA) user defined, default is SMA //atrPeriod = Average True Range period user defined, default is 9 //hlPeriod = high low period user defined, default is 16 //factor = user defined, default is 2.5 //pb = paint bars user defined, default is true //sv = show volatility lines user defined, default is true //andOr = and or option user defined, default is and //index = current bar number

Calculation

atr = atr(index, atrPeriod);  //Average True Range
aatr = factor * ma(method, index, atrPeriod, ATR);
band1 = lowest(index, hlPeriod, LOW) + aatr;
band2 = highest(index, hlPeriod, HIGH) - aatr;
if (sv)
  Plot1: band1;
  Plot2: band2;
endIf
if (andOr.equals("And"))
     upperVolt=price moreThan band1 && price moreThan band2;
     lowerVolt=price lessThan band1 && price lessThan band2;
endif
if (andOr.equals("Or"))
    upperVolt=price moreOrEqual band1 || price moreOrEqual band2;
    lowerVolt=price lessOrEqual band1 || price lessOrEqual band2;
endif
if (upperVolt AND pb) 
   setPriceBarColor(index, bullColor);
endIf
if (lowerVolt AND pb) 
  setPriceBarColor(index, bearColor);
endIf

Linear Regression

Linear Regression is a statistical representation of the price data. It is a straight line on an x (date) y (price) graph that best represents the price data between its starting and ending points. It is calculated using the sum of least squares method. The user may change the input (close), number of regression bars and number of future bars. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using Linear Regression

The linear regression line may be used to show the current trend. The slope of the line designates an upward or downward trend. No signals are generated and it should be used in conjunction with other indicators.

Calculation

//input = price, user defined, default is closing price //noBars = user defined, default is 40 //noFutureBars = user defined, default is 1 //index = current bar number

endIndex = size() -1;
startIndex = endIndex - noBars;
value[] = linRegLine(endIndex, noBars, input);
a = value[0];   //a in line equasion y = a + (m * x)
m = value[1];  //m in line equasion y = a + (m * x)
//y = a + (m * x)
startY = a + (m * 0);
endY = a + (m * noBars);
start = Coordinate(getStartTime(startIndex), startY);
end = Coordinate(getStartTime(endIndex), endY);
line = Line(start, end);
line.setExtendRight(noFutureBars);
addFigure(line);

Linear Regression Curve

Linear Regression Curve (LRC) is a type of Moving Average based on the linear regression line equation (y = a + mx). The calculation produces a straight line with the best fit for the various prices for the period. The endpoint of this line is used to plot the LRC. A signal line (PRICE), which is the price chosen by the user is used to help trigger signals. Two user factors are applied to the price to determine the buy or sell signal. The user may change the input (close), period length and factors. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using Linear Regression Curve

A buy signal is generated when the price moves below the linear regression curve times a user-defined percent value. Conversely, a sell signal is given when the price moves above the linear regression curve times a user-defined percent value.

Calculation

//input = price, default is closing price //period = linear regression period, default is 9 //pcAbove = percent above, default is .009 //pcBelow = percent below, default is .009 //index = current bar number

price = getPrice(index, input, 0);
linReg = linRegLine(index, period, input, period)[0]; //end point of lin. reg. line
plot1: linReg;
plot2: price;
//Signals
pcAbove = 1 + pcAbove/100.0;
pcBelow = 1 - pcBelow/100.0;
sell = price moreThan; linReg * pcAbove;
buy = price lessThan; linReg * pcBelow;

Linear Regression Channel

Linear Regression Channel is a popular technical analysis that uses price volatility to provide the price trend directions and the potential buy/sell signals. This indicator displays a channel using a standard deviation multiplier above or below a Linear Regression trend line. The Linear Regression trend line is the middle/center line that represents the general trend in price movements. The other two lines: The Upper and Lower Channel, are paralleled to the center line, and their distances are computed using Standard Deviations. These Upper and Lower Channel lines act as resistance and support to signal potential breakouts of the price trend, therefore, offering buy or sell opportunities.

How to trade using Linear Regression Channel

The slopes of the channel indicate the trend of the prices, whether they are in an upward or downward trend, or a sideways market (flat slope).

By default, markers are generated when the prices cross above or below the top (Upper Channel line) or the bottom (Lower Channel line) lines. Users can enable/disable the markers for clearer readings.

In general, sell signals are given when the price reaches the resistance level (Upper Channel line). The sell signals are more reliable when the channel is in a downtrend. Conversely, buy signals are shown when the price drops right below the support level (Lower Channel line). The buy signals are more reliable when the channel is in an uptrend.

Linear Regression Slope

Linear Regression Slope is part of Standard Error Bands by Jon Anderson, Stocks and Commodities Mag. 09/1996. This study should be used with Standard Error PercentA, R Squared and Bollinger Bands®. 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 Linear Regression Slope

Linear Regression Slope should be used with Standard Error PercentA, R squared and Bollinger Bands®. For a buy opportunity look for narrow Bollinger Bands® turning upward, R squared in the top 15 percent, and the upward trend of the Standard Error PercentA and the Linear Regression Slope. For a sell opportunity look for narrow Bollinger Bands® turning downward, R squared in the bottom 15 percent, and the downward trend of the Standard Error PercentA and Linear Regression Slope. No trading signals are calculated by this study.

Calculation

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

lrs = linRegLine(index, period, input, 0)[1];  //returns linear regression slope
Plot: lrs

Laguerre Combo is a composite study that includes the Laguerre Filter and the Laguerre RSI. See individual studies for details.

Click here for more information.
Click here for more information.
See also article by John Ehlers
See also
See also article by John Ehlers
Click here for more information on Linear Regression
Click here for more information on the Linear Regression Channel
See Laguerre RSI
See Laguerre Filter
Risk Disclosure and Performance Disclaimer Statement