//@Name:DeMark pivots //@Description:Draws DeMark 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]; var penA = [0,1]; var widthA = [0,0]; var dataList = ["Daily","Weekly","Monthly"]; var dataChoice = 0; var switchA = [1,1,1]; //[PP,R1,S1,R2,S3,etc.] var pens = []; var widths = []; var switches = []; var lineDialog = ["Pivot","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]]); widths = restore(storage.getAt(1), [[widthA[0],0,7],[widthA[1],0,7]]); switches = restore(storage.getAt(2), [[switchA[0],0,1],[switchA[1],0,1],[switchA[2],0,1]]); dataChoice = storage.getAt(5); 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