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
  • Ease Of Movement
  • Ehlers Filter
  • Ehlers Filter Distance Coeff
  • Elders Force Index
  • Elder Ray Bear Power
  • Elder Ray Bull Power
  • Elder Ray Index
  • Elders Safezone Stops
  • Elders Thermometer
  • Elastic Volume Weighted Moving Average
  • Ergodic MACD
  • Elliott Wave Oscillator
  • Envelopes
  • Ergodic Mean Deviation Indicator
  • Ergodic True Strength Index
  • Ergodic TSI2
  • Exponential Moving Average (EMA)
  • Fast And Slow Kurtosis
  • Fast And Slow RSI
  • Fast And Slow Stochastics
  • Fibonacci Lucas Time Series Indicator
  • Fibonacci Retrace
  • Fisher Transform
  • Fisher Transform Stochastic Oscillator
  • Force Index
  • Fractal
  • Fractal Adaptive Moving Average
  1. Studies

E - F

PreviousC - DNextG - H

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

Ease Of Movement

The Ease Of Movement Indicator, developed by Richard W Arms, uses highs, lows and volume in its calculation. Adjustable guides are given to fine-tune the trading signals. The user may change the method (EMA), 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 Ease Of Movement

Adjust the top and bottom guides to control the quantity and quality of the trading signals. If the EM has peaked above the top guide a sell signal will be generated. Conversely, if the EM has troughed below the bottom guide a buy signal will be given. The 0 line divides the bulls (above) from the bears (below).

Calculation

//method = moving average (user defined, default is EMA) //index = current bar number //prevP = previousPrice //MT = more than //LT = less than //ma = moving average

prevP = price[index-1];
vol = getVolume(index)volume /1000000;  // volume in millions
prevHigh = High[index-1]);
prevLow = Low[index-1];
midPoint = (high + low) / 2;
prevMid = (prevHigh + prevLow) / 2;
midPointMove = midPoint - prevMid;
boxRatio = vol / (high - low);
roughEm = midPointMove / boxRatio;
Plot: EM = ma(method, index, period, roughEm);
//Signals
prevEm = EM[index-1];
sell = (em MT topGuide) AND (prevEm MT em);
buy = (em LT bottomGuide AND prevEm LT em);

Ehlers Filter

Ehlers Filter (EF) was authored, not surprisingly, by John Ehlers. The EF uses current prices, prior prices (determined by momentum length) and their difference over a time period to calculate its value. The user may change the input (close), period and momentum length. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using Ehlers Filter

Ehlers 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 closing price //period = p1 = user defined, default is 20 //momentum length = p2 = user defined, default is 5 //index = current bar number, LOE = less or equal

iprice = 0, priorP = 0, num = 0, sumC = 0;
coef[] = new [p1];
count = 0;
for(i = index - (p1-1); i LOE index; i++)
    iprice = price[i];
    priorP = price[i-p2];
    coef[count] = Math.abs(iprice - priorP);
    count++;
endFor
count = 0;
for(i = index - (p1-1); i LOE index; i++)
    iprice = price[i];
    num = num + coef[count] * iprice;
    sumC = sumC + coef[count];
    count++;
endFor
Plot: filt = num / sumC;

Ehlers Filter Distance Coeff

Ehlers Filter Distance Coeff (EFDC) was authored, not surprisingly, by John Ehlers. The EFDC uses current prices, prior prices and their difference over a time period to calculate its value. 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 Ehlers Filter Distance Coeff

Ehlers Filter Distance Coeff 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 closing price //period = p1 = user defined, default is 20 index = current bar number, LOE = less or equal

iprice = 0, priorP = 0, num = 0, sumC = 0, filt = 0;
coef[] = new [p1];
d2[] = new [p1];
count = 0;
for(i = index - (p1-1); i LOE index; i++)
    d2[count] = 0;
    iprice = price[i];
    for( lb = 1; lb lessThan p1; lb++)
        priorP = price[i-lb];
        d2[count] = d2[count] + (iprice - priorP) * (iprice - priorP);
    endFor
    coef[count] = d2[count];
    count++;
endFor
count = 0;
for(i = index - (p1-1); i LOE index; i++)
    iprice = price[i];
    num = num + coef[count] * iprice;
    sumC = sumC + coef[count];
    count++;
endFor
if (sumC != 0) filt = num / sumC;
Plot: filt

Elders Force Index

Elders Force Index (FORCE) was authored, not surprisingly by Alexander Elder. Elder first forms a raw force from the volume times the current price minus the previous price. The FORCE is then created by an exponential moving average (EMA) of the raw force, and plotted as a multi-colored histogram. A signal line which is an EMA of the FORCE is also displayed. 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 Elders Force Index

If the FORCE is above the middle guide and the MA is falling a sell signal is generated. Conversely, if the FORCE is below the middle guide and the MA is rising a buy signal is given.

Calculation

//method = moving average (ma), user defined, default is EMA //period1 = p1, user defined, default is 2 //period2 = p2, user defined, default is 13 //prev = previous, index = current bar number

prevP = price[index-1];
vol = getVolume(index);
rawForce =  vol * (price - prevP);
Plot1: force = ma(method, index, p1, rawForce);
Plot2: ma = ma(method, index, p2, rawForce);
//Signals
prevMa = ma[index-1];
highSell = force for last sell signal, reset to max_negative at each  buy signal;
lowBuy = force for last buy signal, reset to max_positive at each sell signal;
sell = force moreThan midGuide AND ma lessThan prevMa AND price moreThan highSell;
buy = force  lessThan midGuide AND ma moreThan prevMa AND price lessThan lowBuy;

Elder Ray Bear Power

Elder Ray Bear Power was authored by Alexander Elder. Elder Ray Bear Power should be used with Elder Ray Bull Power. The Elder Ray Bear Power is the current low added to the exponential moving average of the midpoint price for a 13-bar period. The user may change the input (midpoint), method (EMA) and period length. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using Elder Ray Bear Power

Elder Ray Bear Power should be used with Elder Ray Bull Power. If the bear troughs below the mid guide and the ma is rising a buy signal is given.

Calculation

//input = price, user defined, default is midpoint //method = moving average (ma), user defined, default is EMA //period = user defined, default is 13 //index = current bar number

ma = ma(method, index, period, input);
bull = high - ma;
Plot: bear = low - ma;
//Signals
prevBull =bull[index-1];
prevBear =bear[index-1];
prevMa = ma[index-1];
lowBuy = bear for last buy signal, reset to max_positive at each  sell signal;
sell = bull moreThan midGuide  AND bull lessThan prevBull AND ma lessThan prevMa AND bull moreThan highSell;
buy = bear lessThan midGuide AND bear moreThan prevBear AND ma moreThan prevMa AND bear lessThan lowBuy ;

Elder Ray Bull Power

Elder Ray Bull Power was authored by Alexander Elder. Elder Ray Bull Power should be used with Elder Ray Bear Power. The Elder Ray Bull Power is the current high added to the exponential moving average of the midpoint price for a 13-bar period. The user may change the input (midpoint), method (EMA) and period length. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using Elder Ray Bull Power

Elder Ray Bull Power should be used with Elder Ray Bear Power. If the bull peaks above the mid guide and the ma is falling a sell signal is given.

Calculation

//input = price, user defined, default is midpoint //method = moving average (ma), user defined, default is EMA //period = user defined, default is 13 //index = current bar number

ma = ma(method, index, period, input);
bear = low - ma;
Plot: bull = high - ma;
//Signals - a buy signal is calculated but not displayed
prevBull =bull[index-1];
prevBear =bear[index-1];
prevMa = ma[index-1];
highSell = bull for last sell signal, reset to max_negative at each  buy signal;
sell = bull moreThan midGuide  AND bull lessThan prevBull AND ma lessThan prevMa AND bull moreThan highSell;
buy = bear lessThan midGuide AND bear moreThan prevBear AND ma moreThan prevMa AND bear lessThan lowBuy ;
if (buy)  highSell = max_negative;

Elder Ray Index

The Elder Ray Index (ERI) was authored by Alexander Elder. The ERI should be used with Elder’s Bear and Bull Power studies. The ERI is the the exponential moving average of the midpoint price for a 13 bar period. The user may change the input (midpoint), method (EMA) and period length. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using Elders Bear Power

The Elder Ray Index should be used with Elder’s Bear and Bull Power studies. Keep the inputs, methods and period lengths the same for all studies. If the MA is rising and the bear troughs below the mid guide a buy signal is generated. Conversely, if the ma is falling and the bull peaks above the mid guide a sell signal is given.

Calculation

//input = price, user defined, default is midpoint //method = moving average (ma), user defined, default is EMA //period = user defined, default is 13 //index = current bar number

Plot: ma = ma(method, index, period, input);
bull = high - ma;
bear = low - ma;
//Signals
prevBull =bull[index-1];
prevBear =bear[index-1];
prevMa = ma[index-1];
lowBuy = bear for last buy signal, reset to max_positive at each  sell signal;
highSell = bull for last sell signal, reset to max_negative at each  buy signal;
sell=bull moreThan midGuide  AND bull lessThan prevBull AND ma lessThan prevMa AND bull moreThan highSell;
buy=bear lessThan midGuide AND bear moreThan prevBear AND ma moreThan prevMa AND bear lessThan lowBuy;

Elders Safezone Stops

Elders Safezone Stops (ESSS) was authored, not surprisingly by Alexander Elder. ESSS identifies stop-loss exit points for long and short positions. Optional entry points are also displayed. The user may change the position (long), input (close), method (EMA), period lengths, look back, factor and show entry option. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using Elders Safezone Stops

Elders Safezone Stops are designed to aid in stop loss exit decisions. However, entry points are optionally provided. These are based on five consecutive increases in an uptrend (buy) or five consecutive decreases in a downtrend (sell).

Calculation

//position = pos, user defined, default is long //input = price, user defined, default is close //method = moving average (ma), user defined, default is EMA //period1 = p1, user defined, default is 63 //period2 = p2, user defined, default is 22 //period3 = p3, user defined, default is 3 //look back = lb, user defined, default is 5 //factor = fac, user defined, default is 2.5 //show entry = showE, user defined boolean, default is false //index = current bar number, prev = previous //LOE = less or equal, MOE = more or equal //shortP = short position, longP = long position

ma = ma(method, index, p1, input);
prevP = price[index-1];
upTrend = price moreThan ma;
dnTrend = price lessThan ma;
longP = pos == "Long";
shortP = pos == "Short";
dmPlus = 0;
dmMinus = 0;
dmAv = 0;
safeZ = 0.0;
countP = 0, countM = 0;
for (i = index - (p2 + 1); i LOE index; i++) {
    ihigh = high[i];
    prevH = high[i-1];
    ilow = low[i];
    prevL = low[i-1];
    if (prevL moreThan low) countM++; dmMinus = dmMinus + (prevL - low);
    if (high moreThan prevH) countP++; dmPlus = dmPlus + (high - prevH);
endFor
if (upTrend AND countM != 0)
    dmAv = dmMinus / countM;
    safeZ = prevL - fac * dmAv;
    safeZ = highest(p3, SAFEZ);
if (dnTrend AND countP != 0)
    dmAv = dmPlus / countP;
    safeZ = prevH + fac * dmAv;
    safeZ = lowest(p3, SAFEZ);
endIf
 //Signals
lowFive = false;
for (i = -(lb-1); i lessOr=0; i++)
    cLow = low[index+i];
    pLow = low[index+i -1];
    cMa = MA[index+i];
    pMa = MA[index+i-1];
    lowFive =  (cLow lessThan pLow AND cLow lessThan cMa AND pLow lessThan pMa);
    if (!lowFive) break;
endFor
highFive = false;
for (i = -(lb-1); i LOE 0; i++)
    cHigh = high[index+i];
    pHigh high[index+i -1];
    cMa = MA[index+i];
    pMa = MA[index+i-1];
    highFive =  (cHigh moreThan pHigh AND cHigh moreThan cMa AND pHigh moreThan pMa);
    if (!highFive) break;
endFor
sell = false, buy = false;
if (safeZ != 0) {
    if (longP AND upTrend)
sell = prevP moreThan safeZ AND price lessThan safeZ;  //sell to exit
        buy = highFive AND showE;  //buy
    endIf
    if (shortP AND dnTrend) {
        sell = lowFive AND showE;   //sell short
        buy = prevP lessThan safeZ AND price moreThan safeZ;  //buy to cover
    endIf
endIf

Elders Thermometer

Elders Thermometer (THER) was authored, not surprisingly by Alexander Elder. The THER is the highest absolute difference of either, the previous low minus the current low or, the current high minus the previous high. The THER is plotted as a tri-colored histogram; and a signal line which is an exponential moving average of the THER is also displayed. User-defined buy and sell factors are provided to further control the trading signals. The user may change the method (EMA), period length and buy-sell factors. This indicator’s definition is more distinctly expressed in the condensed code given in the calculation below.

How To Trade Using Elders Thermometer

Adjust the buy and sell factors to control the quantity and quality of the trading signals. If the THER is more than MA times sellFac a sell signal is generated. Conversely, if the THER is less than the MA times buyFac a buy signal is given.

Calculation

//method = moving average (ma), user defined, default is EMA //period = user defined, default is 20 //buy factor = buyFac, user defined, default is 2 //sell factor = sellFac, user defined, default is .5 //index = current bar number

prevL = low[index-1];
prevH = high[index-1];
therL = Math.abs(prevL - low);
therH = Math.abs(high - prevH);
ther = therL;
if (therH moreThan therL) ther = therH;
PlotHist: ther;
Plot: ma = ma(method, index, period, THER);
//Signals
sell = ther moreThan (ma * sellFac);
buy = ther lessThan (ma * buyFac);

Elastic Volume Weighted Moving Average

The Elastic Volume Weighted Moving Average is a trend indicator that uses average volume in its moving average calculation. The user may change the input (close), multiplier and period length. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using Elastic Volume Weighted Moving Average

The EVWMA may be used in conjunction with other indicators as a trend indicator. No trading signals are calculated.

Calculation

//method = moving average (ma) user defined, default is SMA //input = price (user defined, default is closing price) //mult = user input, default 20 //period = user input, default 40 //index = current bar number, avVol = average volume //prevE = previousEVWMA

avVol = ma(method, index, period, volume);
n = avVol * mult;
prevE = ifNull(price, EVWMA[index-1]);
Plot: EVWMA = ((n - vol) * prevE + volume * price) / n;

Ergodic MACD

The Ergodic MACD was authored by William Blau. The MACD plot is the difference between a fast and a slow exponential moving average (EMA). A signal line which is an EMA of the MACD is also plotted. Adjustable guides are given to fine-tune the trading signals. The user may change the input (close), method and period lengths. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using Ergodic MACD

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

Calculation

//input = price, user defined, default is closing price //method = moving average (ma), user defined, default is EMA //period1 = user defined, default is 32 //period2 = user defined, default is 5 //period3 = user defined, default is 5 //sig = signal, index = current bar number

Plot1: macd = macd(index, period1, period2, input, method);
Plot2: sig = ma(method, index, period3, MACD);
//Signals
highSell = macd for last sell signal, reset to max_negative at each  buy signal;
lowBuy = macd for last buy signal, reset to max_positive at each sell signal;
sell = crossedBelow(MACD,SIG) AND macd moreThan topGuide  AND (macd moreThan highSell);
buy = crossedAbove(MACD, SIG) AND macd lessThan bottomGuide AND (macd lessThan lowBuy);

Elliott Wave Oscillator

The Elliott Wave Oscillator (EWO) is the difference of, a 34 and a 5 period, simple moving average (SMA). It illustrates what’s happening to the market driving force at the present moment. The user may change the input (Midpoint), method (SMA) and period lengths. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using Elliott Wave Oscillator

No trading signals are calculated for this indicator.

Calculation

//input = price, user defined, default is Midpoint //method = moving average (ma), user defined, default is SMA //slowPeriod = user defined, default is 34 //fastPeriod = user defined, default is 5 //index = current bar number //MT= more than, LT= less than

slowMA = ma(method, index, slowPeriod, input);
fastMA = ma(method, index, fastPeriod, input);
diff = fastMA - slowMA;
prev = diff[index-1];
if (prev MT diff) setcolor(downColor);
else setColor(upColor);
PlotHist: diff

Envelopes

Envelopes are formed with two moving averages, one shifted upward and the other shifted downward. Envelopes define the upper and lower margins of a price range. They are calculated as follows: Upper Band = SMA(CLOSE, N) * [1 + DEVIATION] Lower Band = SMA(CLOSE,N) * [1 - DEVIATION]. The user may change input (close), method (SMA), 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 Envelopes

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 //period = user defined, default is 14 //shift = user defined, default is 0 //deviation = user defined, default is 1 //LT = less than, LOE = less or equal

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

Ergodic Mean Deviation Indicator

The Ergodic Mean Deviation Indicator (EMDI) was authored by William Blau. The EMDI uses price and an exponential moving average (EMA) difference, as fodder for further EMA’s which culminate in its oscillator and signal values. The user may alter the input (close), methods (EMAs) and period lengths. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using Ergodic Mean Deviation Ind

A sell signal is generated when the EMDI crosses below the signal line. Conversely, a buy signal is given when the EMDI crosses above the signal line.

Calculation

//input = price, user defined, default is close //period1 = user input, default is 32 //period2 = user input, default is 5 //period3 = user input, default is 5 //sPeriod = user input, default is 5 //method1 = moving average (ma), user defined, default is EMA //method2 = moving average (ma), user defined, default is EMA //sig = signal, index = current bar number

ma = ma(method1, index, period1, input);
ma1 = price - ma;
ma2 = ma(method1, index, period2, ma1);
Plot1: emdi = ma(method1, index, period3, ma2);
Plot2: sig = series.ma(method2, index, sPeriod, emdi);
//Signals
buy = crossedAbove(EMDI, SIG);
sell =crossedBelow(EMDI, SIG);

Ergodic True Strength Index

Ergodic True Strength Index (ETSI) was authored by William Blau. The ETSI uses price and previous price, with differences and absolute differences, in a series of exponential moving averages (EMA’s) to arrive at its ergodic oscillator value. A signal line which is an EMA of itself is also given. The user may alter 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 Ergodic True Strength Index

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

Calculation

//input = price, user defined, default is close //period1 = user input, default is 4 //period2 = user input, default is 8 //period3 = user input, default is 6 //sPeriod = user input, default is 3 //method = moving average (ma), user defined, default is EMA //prev = previous, index = current bar number

etsi = 0;
prevP = price[index-1];
priceD = price - prevP;
absPriceD = Math.abs(price - prevP);
ma1 = ma(method, index, period1, priceD);
aMa1 = ma(method, index, period1, absPriceD);
ma2 = ma(method, index, period2, ma1);
aMa2 = ma(method, index, period2, ama1);
ma3 = ma(method, index, period3, ma2);
aMa3 = ma(method, index, period3, ama2);
Plot1: etsi = (100 * ma3) / aMa3;
Plot2: sig = ma(method, index, sPeriod, etsi);

Ergodic TSI2

Ergodic TSI2 (ETSI2) was authored by William Blau. The ETSI2 uses price and previous price, with differences and absolute differences, in a series of exponential moving averages (EMA’s) to arrive at its ergodic oscillator values. A signal line which is an EMA of ESTI is also given. The user may alter 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 Ergodic TSI2

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

Calculation

//input = price, user defined, default is close //period1 = user input, default is 21 //period2 = user input, default is 9 //period3 = user input, default is 9 //period4 = user input, default is 17 //period5 = user input, default is 6 //period6 = user input, default is 2 //sPeriod = user input, default is 2 //method = moving average (ma), user defined, default is EMA //prev = previous, abs = absolute value //index = current bar number

etsi = 0;
prevP = price[index-1];
priceD = price - prevP;
absPriceD = Math.abs(price - prevP);
ma1 = ma(method, index,  period1, priceD);
aMa1 = ma(method, index, period1, absPriceD);
ma4 = ma(method, index, period4, priceD);
aMa4 = ma(method, index, period4, abdPriceD);
ma2 = ma(method, index, period2, ma1);
aMa2 = ma(method, index, period2, ama1);
ma5 = ma(method, index, period5, ma4);
aMa5 = ma(method, index, period5, aMa4);
ma3 = ma(method, index, period3, ma2);
aMa3 = ma(method, index, period3, ama2);
ma6 = ma(method, index, period6, ma5);
aMa6 = ma(method, index, period6, aMa5);
Plot1: etsi2 = (100 * ma6) / aMa6;
Plot2: etsi = (100 * ma3) / aMa3;
Plot3: sig = ma(method, index, sPeriod, esti);

Exponential Moving Average (EMA)

Exponential Moving Average (EMA) is a type of weighted moving average where the weighting factors decrease exponentially. 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 Exponential Moving Average

The Exponential 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 //ema = exponential moving average //index = current bar number

Plot: ema = ema(index+shift, input, period);

Fast And Slow Kurtosis

Fast And Slow Kurtosis (FSK) was authored by U. Jenson for Omega Research. The FSK uses Momentum, previous Momentum and previous FSK (feedback) along with a percentage factor to plot its value. A signal line, which is a weighted moving average of itself, is also given. The user may change the input (close), method (WMA) and period length. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using Fast And Slow Kurtosis

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

Calculation

//input = price (user defined, default is closing price) //method = moving average (user defined, default is WMA) //period = user defined, default is 3 //prev = previous, index = current bar number

mom = momentum(index, period, input);
prevMom = mon[index-1];
prevFsk = FSK[index-1];
Plot1: fsk = (.03 * (mom - prevMom)) + ((1 - .03) * prevFsk);
Plot2: sig = ma(method, index, period, fsk);
//Signals
highSell = fsk for last sell signal, reset to max_negative at each  buy signal;
lowBuy = fsk for last buy signal, reset to max_positive at each sell signal;
buy = crossedAbove(FSK, SIG);
sell = crossedBelow(FSK, SIG);

Fast And Slow RSI

Fast And Slow RSI (FSRSI) was authored by U. Jenson for Omega Research, 1997. First, the FSRSI calculates the Fast and Slow Kurtosis (FSK) using Momentum, previous Momentum and previous FSK (feedback) along with a percentage factor. Next, the FSRSI uses the FSK and the Relative Strength Index for the final calculation. A signal line, which is a weighted moving average of itself, is also given. The user may change the input (close), method (WMA) and period lengths. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using Fast And Slow RSI

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

Calculation

//input = price (user defined, default is closing price) //method = moving average (ma), user defined, default is WMA //period1 = user defined, default is 3 //period2 = user defined, default is 6 //period3 = user defined, default is 9 //period4 = user defined, default is 6 //prev = previous, rsi = Relative Strength Index //index = current bar number

mom = momentum(index, period, input);
prevMom = mon[index-1];
prevFsk = FSK[index-1];
fsk = (.03 * (mom - prevMom)) + ((1 - .03) * prevFsk);
v4 = ma(method, index, period2, fsk);
rsi = rsi(index, period3, input)[0];
Plot1: fsrsi = (10000 * v4) + rsi;
Plot2: sig = ma(method, index, period4, FSRSI);
//Signals
buy = crossedAbove(FSRSI, SIG);
sell = crossedBelow(FSRSI, SIG);

Fast And Slow Stochastics

Fast And Slow Stochastics (FSST) was authored by U. Jenson for Omega Research, 1997. First, the FSST calculates the Fast and Slow Kurtosis (FSK) using Momentum, previous Momentum and previous FSK (feedback) along with a percentage factor. Next, the FSST uses the FSK and Stochastics for the final calculation. A signal line, which is a weighted moving average of itself, is also given. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using Fast And Slow ST

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

Calculation

//input = price, user defined, default is closing price //method = moving average (ma), user defined, default is WMA //period1 = user defined, default is 3 //period2 = user defined, default is 6 //period3 = user defined, default is 9 //period4 = user defined, default is 9 //prev = previous, stochK = Stochastis fast K //index = current bar number

mom = momentum(index, period, input);
prevMom = mon[index-1];
prevFsk = FSK[index-1];
fsk = (.03 * (mom - prevMom)) + ((1 - .03) * prevFsk);
v4 = ma(method, index, period2, fsk);
fastk = stochK(index, period3, key);
slowk = ma(method,  index, period3, fastK);
fsst = 500 * v4 + slowk;
wfsst = ma(method, index, period4, fsst);

Fibonacci Lucas Time Series Indicator

The Fibonacci Lucas Time Series Indicator was authored by Andrew Coles in the Stocks And Commodities Magazine in August 2012. In addition, a Moving Average is provided to aid the user in selecting an entry point. This indicator displays possible exit points based on Fibonacci and Lucas numbers, calculated as the number of bars from the chosen entry point. The user may change the entry point date and time (year, month, day, hour, minute), the input (close), method for Moving Average (EMA) and period length. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using the Fibonacci Lucas Time Series Indicator

Choose an appropriate entry point; a Moving Average is provided to aid in this choice. Possible exit points are calculated and displayed based on Fibonacci and Lucas numbers since the entry date.

Calculation

//Year = entry time, user defined, default is 2012 //Month = entry time, user defined, default is 9 //Day = entry time day of month, user defined, default is 10 //Hour = entry time (0-24), user defined, default is 10 //Minute = entry time, user defined, default is 0 //input = price, user defined, default is close //method = moving average, user defined, default is EMA //period = user defined, default is 21 //index = current bar number

Plot: ma = ma(method, index, period, input);
//Get date and time of current bar
GregorianCalendar cal = new GregorianCalendar();
curBarTime =  getStartTime(index);      
cal.setTimeInMillis(curBarTime);
cYr = cal.get(GregorianCalendar.YEAR);
cMth = cal.get(GregorianCalendar.MONTH);
cDay = cal.get(GregorianCalendar.DAY_OF_MONTH);
cHr = cal.get(GregorianCalendar.HOUR_OF_DAY);
cMin = cal.get(GregorianCalendar.MINUTE);
//Compare date and time of current bar to values entered
if (cYr==yr AND cMth==mth AND cDay==day AND cHr==hr AND cMin==min) 
      dateTime = String.valueOf(yr)+ " " + String.valueOf(mth)+ " " +
         String.valueOf(day)+ " " + String.valueOf(hr)+ " " + String.valueOf(min);
      startIndex = index;
      sigMess = get("ENTER_PRICE_TIME");
      dispMess = get("ENTER") + ":" + dateTime;
      enter = true;
endIf
if (startIndex lessThan 0 ) return;

if (neutralOn) setPriceBarColor(index, neutralC);
exitNo = index - startIndex;
if (isFibonacci(exitNo)) 
        setPriceBarColor(index, fibC);
        sigMess = get("EXIT_PRICE_FIBONACCI");
        dispMess = get("EXIT_FIB") + String.valueOf(exitNo);
        exit = true;
endIf
if (isLucas(exitNo)) 
        setPriceBarColor(index, lucC);
        sigMess = get("EXIT_PRICE_LUCAS");
        dispMess = get("EXIT_LUC") + String.valueOf(exitNo);
        exit = true;
endIf

Fibonacci Retrace

The author of Fibonacci Retrace (FR) is unknown. Leonardo Fibonacci was an Italian mathematician who dealt with number sequences. The retrace factor in this calculation is derived from the Fibonacci number series. The FR applies the highest highs minus lowest lows times the retrace factor, to an exponential moving average to produce an upper and lower band. The user may change the method (EMA), input (close), period lengths and retrace factor. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using Fibonacci Retrace

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 WMA //period1 = user defined, default is 15 //period2 = user defined, default is 50 //retfac = retrace factor, user defined, default is .382

Plot1: ma = ma(method, period1, input);
highest = highest(period2, HIGH);
lowest = lowest(period2, LOW);
retrace = (highest - lowest) * retfac;
Plot2: hret = highest - retrace;
Plot3: lret = lowest + retrace;

Fisher Transform

The Fisher Transform was presented by John Ehlers in the Stocks and Commodity Magazine, November 2002. It assumes that price distributions behave like square waves. The Fisher Transform uses the mid-point or median price in a series of calculations to produce an oscillator. A signal line which is a previous value of itself is also displayed. Adjustable guides are also given to fine-tune the signals. The user may change the input (midpoint), 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 Fisher Transform

Adjust the top and bottom guides to control the quantity and quality of the trading signals. The Fisher Transform has a range of +1 to -1. In addition to the adjustable guides, if the fisher crosses the signal line a change in trend is predicted. If the Fisher is above the top guide and crosses below the signal line a sell signal will be generated. Conversely, if the Fisher is below the bottom guide and crosses above the signal line a buy signal will be given. The 0 line divides the bulls (above) from the bears (below).

Calculation

//input = price user defined, default is midpoint or median //period1 = user defined, default is 10 //period2 = user defined, default is 2 //prev = previous, index = current bar number //LT = less than //MT = more than

median = high + low / 2;
minMedian = lowest(index, period1, median);
maxMedian = highest(index, period1, median);
prevValue = VALUE[index-1];
prevFish = FISHER[index-1];
SIGNAL = FISHER[index-period2];
temp = (median - minMedian) / (maxMedian - minMedian);
VALUE = .5 * 2 * (temp - .5) + (.5 * prevValue);
if (VALUE mT .9999) VALUE = .9999;
temp = (1 + value) / (1 - value);
Plot1:FISHER = (.25 * log(temp)) + (.5 * prevFish);
Plot2: SIGNAL;
//Signals
highSell = fisher for last sell signal, reset to max_negative at each  buy signal;
lowBuy = fisher for last buy signal, reset to max_positive at each sell signal;
sell = fisher MT topGuide AND  crossedBelow(FISHER, SIGNAL) AND (fisher MT highSell);
buy =  fisher LT bottGuide AND crossedAbove(FISHER, SIGNAL) AND (fisher LT lowBuy);

Fisher Transform Stochastic Oscillator

The Fisher Transform Stochastic Oscillator was authored by Sylvain Vervoort in the Stocks and Commodities Magazine, Oct 2011. The oscillator is formed first from a multi-layered Weighted Moving Average, which is then used as the base for the Stochastic calculation. This value (RBWS) is then plied with factors and constants to produce the oscillator (FTSO). The user may change the input (close), method (WMA), 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 the Fisher Transform Stochastic Oscillator

Adjust the top and bottom guides to control the quantity and quality of the trading signals. FTSO values above 70 to 80 are considered to be overbought and therefore offer an opportunity to sell. FTSO values below 30 to 20 are considered oversold and present an opportunity to buy. If the FTSO crosses above the top guide a sell signal will be generated. Conversely, if the FTSO crosses below the bottom guide a buy signal will be given. The 50 line divides the bulls above from the bears below

Calculation

//input = price, user defined, default is closing price //method = moving average (ma), user defined, default is WMA //averagePeriod = user defined, default is 2 //stochasticPeriod = user defined, default is 30 //smoothPeriod = user defined, default is 5 //index = current bar number

ma1 = ma(method, index, averagePeriod, price);
rbw = ma1 * 5;
ma2 = ma(method, index, averagePeriod, MA1);
rbw = rbw + ma2 * 4;
ma3 = ma(method, index, averagePeriod, MA2);
rbw = rbw + ma3 * 3;
ma4 = ma(method, index, averagePeriod, MA3);
rbw = rbw + ma4 * 2;
ma5 = ma(method, index, averagePeriod, MA4);
rbw = rbw + ma5;
ma6 = ma(method, index, averagePeriod, MA5);
rbw = rbw + ma6;
ma7 = ma(method, index, averagePeriod, MA6);
rbw = rbw + ma7;
ma8 = ma(method, index, averagePeriod, MA7);
rbw = rbw + ma8;
ma9 = ma(method, index, averagePeriod, MA8);
rbw = rbw + ma9;
ma10 = ma(method, index, averagePeriod, MA9);
rbw = (rbw + ma10) / 20;

//Stochastic Calculation 
lowest = lowest(index, stochasticPeriod, RBW);
highest = highest(index, stochasticPeriod, RBW);
num = rbw - lowest;
den = highest - lowest;
num = sum(index, smoothPeriod, NUM);
den = sum(index, smoothPeriod, DEN);
Plot1: rbws = (num / (den + .0001)) * 100.0;
x = 0.1 * (rbws - 50);
Plor2: ftso = (( Math.exp(2 * x) - 1)/(Math.exp(2 * x) + 1) + 1) * 50;
    
// Check for signal events 
prevFtso = FTSO[index-1];
sell = prevFtso lessThan topGuide AND ftso moreThan topGuide;
buy = prevFtso moreThan bottomGuide AND ftso lessThan bottomGuide;

Force Index

The Force Index (FI) was authored by Alexander Elder. The FI is a price/volume oscillator that may be used to determine if a trend is strengthening or weakening. 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 Force Index

No trading signals are calculated for this indicator.

Calculation

//period = user defined, default is 13 //prev = previous, ema = exponential moving average //index = current bar number

prevClose = close[index-1];
rawForce = (close - prevClose) * getVolume(index);
Plot: FI = ema(index, period, rawForce);

Fractal

Fractal was authored by Bill Williams. Fractal is a technical indicator where, in a series of at least 5 bars, the highest high (or lowest low) is in the middle, and two lower highs (or higher lows) are on both sides. The fractal indicator is often used in conjunction with the Alligator. The user may change only the strength value. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using Fractal

Fractal may be used with the Alligator study. Signals are given according to the rules above.

Calculation

//strength = user defined, default is 2 //MT = more than, LT = less than //MOR= more or equal, LOR= less or equal

for(int i = 2; i LT; size()-2; i++) 
    if (isComplete(i)) continue;
    h1 = getHigh(i-2);
    h2 = getHigh(i-1);
    h4 = getHigh(i+1);
    h5 = getHigh(i+2);
    high = getHigh(i);
    if (high MT h1 AND high LT h2 AND high MT h4 AND high MT h5) 
    //check for next highest bars on each side 
    lmax = Math.max(h1, h2);
    rmax = Math.max(h4, h5);
    if ((lmax MOR= h4 OR lmax MOR= h5) AND (rmax MOR= h1 OR rmax MOR= h2) ) 
        addFigure(downArrow); ....//sell signal 
    else      
        l1 = getLow(i-2);
        l2 = getLow(i-1);
        l4 = getLow(i+1);
        l5 = getLow(i+2);
        low = getLow(i);
        if (low LT l1 AND low LT l2 AND low LT l4 AND low LT l5) 
            //check for next lowest bars on each side 
            lmin = Math.min(l1, l2);
            rmin = Math.min(l4, l5);
            if ((lmin LOR= l4 OR lmin LOR= l5) AND (rmin LOR= l1 OR rmin LOR= l2) ) 
                addFigure(upArrow); //buy signal 
            endIf
        endIf
    endIf
endFor

Fractal Adaptive Moving Average

Fractal Adaptive Moving Average (FRAMA) was authored by John Ehlers. The FRAMA averages the differences of the highest highs and lowest lows over different parts of the period length. These values are mathematically massaged with boolean questions, natural logarithms and Euler’s numbers, and, with some feedback from the former FRAMA, the current FRAMA is finally formed. The user may change the input (midpoint) and period length. This indicator’s definition is further expressed in the condensed code given in the calculation below.

How To Trade Using Fractal Adaptive Moving Average

Fractal Adaptive Moving Average 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 //period = p1 = user defined, default is 20 //exp = function, returns Euler’s number (e) raised to power of its argument //log = function, returns natural logarithm of its argument //index = current bar number, prev = previous

prevF = ifNull(price, filt[index-1]);  //feedback ingredent
hh = highest(index, p1, HIGH);
ll = lowest(index, p1, LOW);
n3 = (hh - ll) / p1;
halfP = p1/2;
hh = highest(index, halfP, HIGH);
ll = lowest(index, halfP, LOW);
n1 = (hh - ll) / halfP;
hh = highest(index-halfP, halfP, HIGH);
ll = lowest(index-halfP, halfP, LOW);
n2 = (hh - ll) / halfP;
if (n1 moreThan 0 AND n2 moreThan 0 AND n3 moreThan 0) dm = (Math.log(n1+n2) - Math.log(n3)) / Math.log(2);
alpha = Math.exp(-4.6 * (dm - 1));
if (alpha lessThan .01) alpha = .01;
if (alpha moreThan 1) alpha = 1;
Plot: filt = alpha * price + (1 - alpha) * prevF;

.

Click here for more information on Ehlers Filter.
Click here for more information on Ehlers Filter Distance Coeff
See also MACD
Click here for more information.
See also Fibonacci Numbers
See also article by John Ehlers
See also Elder Ray Bull Power
See also Elder Ray Bear Power
See also Elders Bull Power
See also Elders Bear Power
See also the Ergodic True Strength Index
.
See also Fast And Slow Kurtosis
See also Fast And Slow Kurtosis
Risk Disclosure and Performance Disclaimer Statement
See also Alligator