WeeklyHiLo.efs
EFSLibrary - Discussion Board
File Name: WeeklyHiLo.efs
Description:
Cueing Off Support And Resistance Levels, by Thom Hartle
Formula Parameters:
- Line Color Resistance : Red
- Line Color Support: Blue
- Line Thickness : 2
- Display Cursor Labels: True
Notes:
The related article is copyrighted material. If you are not a subscriber of Stocks & Commodities, please visit www.traders.com.
Download File:
WeeklyHiLo.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: Cueing Off Support And Resistance Levels, by Thom Hartle Version: 1.0 12/05/2008 Formula Parameters: Default: Line Color Resistance Red Line Color Support Blue Line Thickness 2 Display Cursor Labels True Notes: The related article is copyrighted material. If you are not a subscriber of Stocks & Commodities, please visit www.traders.com. **********************************/ var fpArray = new Array(); var bInit = false; var bVersion = null; function preMain() { setPriceStudy(true); setShowCursorLabel(false); setShowTitleParameters( false ); setStudyTitle("Weekly Hi-Lo Lines"); setCursorLabelName("Resistance", 0); setCursorLabelName("Support", 1); setDefaultBarFgColor(Color.green, 0); setDefaultBarFgColor(Color.blue, 1); setPlotType(PLOTTYPE_FLATLINES, 0); setPlotType(PLOTTYPE_FLATLINES, 1); setDefaultBarThickness(2, 0); setDefaultBarThickness(2, 1); askForInput(); var x=0; fpArray[x] = new FunctionParameter("LineColor1", FunctionParameter.COLOR); with(fpArray[x++]){ setName("Line Color Resistance"); setDefault(Color.red); } fpArray[x] = new FunctionParameter("LineColor2", FunctionParameter.COLOR); with(fpArray[x++]){ setName("Line Color Support"); setDefault(Color.blue); } fpArray[x] = new FunctionParameter("ViewValue", FunctionParameter.BOOLEAN); with(fpArray[x++]){ setName("Display Cursor Labels"); setDefault(true); } fpArray[x] = new FunctionParameter("Thickness", FunctionParameter.NUMBER); with(fpArray[x++]){ setName("Line Thickness"); setLowerLimit(1); setDefault(2); } } function main(Thickness, LineColor1, LineColor2, ViewValue) { var nResistance = 0; var nSupport = 0; if (bVersion == null) bVersion = verify(); if (bVersion == false) return; if ( bInit == false ) { setDefaultBarFgColor(LineColor1, 0); setDefaultBarFgColor(LineColor2, 1); setDefaultBarThickness(Thickness, 0); setDefaultBarThickness(Thickness, 1); setShowCursorLabel(ViewValue); bInit = true; } nResistance = high(-1,inv("W")); nSupport = low(-1,inv("W")); return new Array (nResistance, nSupport); } function verify() { var b = false; if (getBuildNumber() < 779) { drawTextAbsolute(5, 35, "This study requires version 8.0 or later.", Color.white, Color.blue, Text.RELATIVETOBOTTOM|Text.RELATIVETOLEFT|Text.BOLD|Text.LEFT, null, 13, "error"); drawTextAbsolute(5, 20, "Click HERE to upgrade.@URL=http://www.esignal.com/download/default.asp", Color.white, Color.blue, Text.RELATIVETOBOTTOM|Text.RELATIVETOLEFT|Text.BOLD|Text.LEFT, null, 13, "upgrade"); return b; } else { b = true; } return b; }