//@Name:RSI-Value //@Description:Shows current value of the RSI on the script title bar // 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: Richard Chiesa, ShareScope Support //Define the rsi period; var rsiPeriod = 14; function init(status) { if (status == Loading || status == Editing) { rsiPeriod = storage.getAt(0); } if (status == Adding || status == Editing) { var dlg = new Dialog("RSI properties", 155, 55); dlg.addOkButton(); dlg.addCancelButton(); dlg.addIntEdit("VAL1",45,8,-1,-1,"RSI Period","",rsiPeriod,1,999); if (dlg.show() == Dialog.Cancel) return false; rsiPeriod = dlg.getValue("VAL1"); storage.setAt(0,rsiPeriod); } } function onNewChart() { draw(); } function onNewBarUpdate() { draw(); } function draw() { //Create the RSI object var rsiCalc = new RSI(rsiPeriod); //Create the RSI result array var rsiRes=[]; if (bars.length