ElderRayAvg.efs
EFSLibrary - Discussion Board
File Name: ElderRayAvg.efs
Description:
Elder Ray Average
Formula Parameters:
- Length: 13
- Price Data To Use: Close
Notes:
Dr Elder uses a 13-day exponential moving average (EMA) to indicate the market consensus of value. Bull Power measures the ability of buyers to drive prices above the consensus of value. Bear Power reflects the ability of sellers to drive prices below the average consensus of value.
Download File:
ElderRayAvg.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: Elder Ray Average Version: 1.0 09/23/2008 Notes: Dr Elder uses a 13-day exponential moving average (EMA) to indicate the market consensus of value. Bull Power measures the ability of buyers to drive prices above the consensus of value. Bear Power reflects the ability of sellers to drive prices below the average consensus of value. Formula Parameters: Default: Length 13 Price Data To Use Close **********************************/ var fpArray = new Array(); var bInit = false; function preMain() { setPriceStudy(true); setStudyTitle("Elder Ray Average"); setCursorLabelName("Average", 0); setDefaultBarFgColor(Color.blue, 0); setPlotType(PLOTTYPE_LINE,0); setDefaultBarThickness(1,0); var x=0; fpArray[x] = new FunctionParameter("Length", FunctionParameter.NUMBER); with(fpArray[x++]){ setLowerLimit(1); setDefault(13); } fpArray[x] = new FunctionParameter("Price", FunctionParameter.STRING); with(fpArray[x++]){ setName("Price Data To Use"); addOption("open"); addOption("high"); addOption("low"); addOption("close"); addOption("hl2"); addOption("hlc3"); addOption("ohlc4"); setDefault("close"); } } var xMyPrice = null; var xXA = null; function main(Length, Price) { var nXA = 0; if (Price == null) Price = "close"; if (Length == null) Length = 13; if ( bInit == false ) { xMyPrice = eval(Price)(); xXA = ema(Length, xMyPrice); bInit = true; } nXA = xXA.getValue(0); return nXA; }