Ergotic_MACD.efs
EFSLibrary - Discussion Board
File Name: Ergotic_MACD.efs
Description:
Ergotic MACD
Formula Parameters:
- r : 32
Notes:
This is one of the techniques described by William Blau in his book "Momentum, Direction and Divergence" (1995). If you like to learn more, we advise you to read this book. His book focuses on three key aspects of trading: momentum, direction and divergence. Blau, who was an electrical engineer before becoming a trader, thoroughly examines the relationship between price and momentum in step-by-step examples. From this grounding, he then looks at the deficiencies in other oscillators and introduces some
innovative techniques, including a fresh twist on Stochastics. On directional issues, he analyzes the intricacies of ADX and offers a unique approach to help define trending and non-trending periods.
Blau`s indicator is like usual MACD, but it plots opposite of meaningof stndard MACD indicator.
Download File:
Ergotic_MACD.efs
EFS Code:
/********************************* Provided By: eSignal (Copyright c eSignal), a division of Interactive Data Corporation. 2008. All rights reserved. This sample eSignal Formula Script (EFS) is for educational purposes only and may be modified and saved under a new file name. eSignal is not responsible for the functionality once modified. eSignal reserves the right to modify and overwrite this EFS file with each new release. Description: Ergotic MACD Version: 1.0 01/12/2009 Formula Parameters: Default: r 32 Notes: This is one of the techniques described by William Blau in his book "Momentum, Direction and Divergence" (1995). If you like to learn more, we advise you to read this book. His book focuses on three key aspects of trading: momentum, direction and divergence. Blau, who was an electrical engineer before becoming a trader, thoroughly examines the relationship between price and momentum in step-by-step examples. From this grounding, he then looks at the deficiencies in other oscillators and introduces some innovative techniques, including a fresh twist on Stochastics. On directional issues, he analyzes the intricacies of ADX and offers a unique approach to help define trending and non-trending periods. Blau`s indicator is like usual MACD, but it plots opposite of meaningof stndard MACD indicator. **********************************/ var fpArray = new Array(); var bInit = false; function preMain() { setStudyTitle("Ergotic_MACD"); setCursorLabelName("ErgMACD", 0); setCursorLabelName("SigLin", 1); setDefaultBarFgColor(Color.fushcia, 0); setDefaultBarFgColor(Color.grey, 1); addBand(0, PS_SOLID, 1, Color.blue); var x=0; fpArray[x] = new FunctionParameter("r", FunctionParameter.NUMBER); with(fpArray[x++]){ setLowerLimit(1); setDefault(32); } } var xMACD = null; var xMA_MACD = null; function main(r) { var nState = getBarState(); if (nState == BARSTATE_ALLBARS) { if (r == null) r = 32; } if ( bInit == false ) { xMACD = macd(r, 5, 5); xMA_MACD = ema(5, xMACD); bInit = true; } if (xMA_MACD.getValue(0) == null) return; return new Array(xMACD.getValue(0), xMA_MACD.getValue(0)); }