//@Name: Woodie's pivots //@Description:Draws Woodie pivot levels based on the previous Daily/Weekly/Monthly OHLC //@Env:Production // Care has been taken in preparing this code but it is provided without guarantee. // You are welcome to modify and extend it. Please add your name as a modifier if you distribute it. // Coded by: Paul Hall, ShareScope Support var colourA = [16711680,65025,255,Colour.DarkYellow]; var penA = [0,1,2,3]; var widthA = [0,0,0,0]; var dataList = ["Daily","Weekly","Monthly"]; var dataChoice = 0; var switchA = [1,1,1,1,1,0,0]; //[PP,R1,S1,R2,S3,etc.] var pens = []; var widths = []; var switches = []; var lineDialog = ["Pivot","First Support/Resistance","Second Support/Resistance","Third Support/Resistance"]; var show = 1; //Draws the Dialog box and stores the values set so that they can be recalled either when starting the program or when edditing the indicator. function init(status) { if (status == Loading || status == Editing) { pens = restore(storage.getAt(0), [[penA[0],0,4],[penA[1],0,4],[penA[2],0,4],[penA[3],0,4]]); widths = restore(storage.getAt(1), [[widthA[0],0,7],[widthA[1],0,7],[widthA[2],0,7],[widthA[3],0,7]]); switches = restore(storage.getAt(2), [[switchA[0],0,1],[switchA[1],0,1],[switchA[2],0,1],[switchA[3],0,1],[switchA[4],0,1],[switchA[5],0,1],[switchA[6],0,1]]); dataChoice = storage.getAt(7); for (var i=0;i8388608) print("Too much data for single storage space") return output } function restore(storage, data) { var remainder = storage var rangeTot = 1 for (var i=0;i=0;i--) { if (i