//@Name:High/Low Lines //@Description:Draws horizontal lines at the highest high (or close) and lowest low (or close) between two points. //@Env:Production //@Editable:No var addButtonHandle; var chlButtonHandle; var chl = 0; //use close or high-low to draw gann levels var state = 0; //the 3 drawing states: 0:before button press, 1:before first candle click, 2:before second candle click var items = []; //array of shares with stored gann values var thisItem; //the line number of the current share var firstBarDateNum; var firstBarTimeNum; function init() { addButtonHandle = createButton("x", addButton); chlButtonHandle = createButton("x", chlButton); createButton("Remove All", reset); var F = new File(); try { F.open("/Output/HighLowLines.cfg",File.ReadMode); } catch (e) { F.open("/Output/HighLowLines.cfg",File.WriteMode); } finally { F.close(); } } function onNewChart() { clearDisplay(); state = 0; updateInterface(); drawStoredLines() } function reset() { clearDisplay(); state = 0; items[thisItem].length = 2; //delete the whole storage entry for this share except for the SharescopeID and share number //write the changes to the file var F = new File(); F.open("HighLowLines.cfg",File.WriteMode); for (i=0;iindex2) break; if (ll==null|| ll>bars[i].low) ll=bars[i].low; if (hh==null|| hhindex2) break; if (ll==null|| ll>bars[i].close) ll=bars[i].close; if (hh==null|| hh