Can someone pls tell me what I have done wrong here? I have no bars printing in my indicator pane!!! I do have the value RETURNed to my cursor window, however, but not a bar in the pane!
Thanks
GP
function preMain(){ setPriceStudy(false); setStudyTitle("Up/Dn Vol"); setCursorLabelName("Up/Dn Vol"); setDefaultBarFgColor(Color.green); setStudyMin(20); setStudyMax(299); addBand(100, PS_SOLID, 2, Color.black,"equalvolume"); var fp0 = new FunctionParameter("market", FunctionParameter.STRING); fp0.setName("Market"); fp0.addOption("NYSE"); fp0.addOption("NASDAQ"); fp0.setDefault("NYSE"); } var volRatio; function main(market){ if (market=="NYSE") {volRatio=((close("$UVOL")/close("$DVOL"))*100).toFixed(2);} else {volRatio=((close("$UVOLQ")/close("$DVOLQ"))*100).toFixed(2);} if (volRatio < 100) {setBarFgColor(Color.red,0);} return new Array (volRatio); }
Thanks
GP
function preMain(){ setPriceStudy(false); setStudyTitle("Up/Dn Vol"); setCursorLabelName("Up/Dn Vol"); setDefaultBarFgColor(Color.green); setStudyMin(20); setStudyMax(299); addBand(100, PS_SOLID, 2, Color.black,"equalvolume"); var fp0 = new FunctionParameter("market", FunctionParameter.STRING); fp0.setName("Market"); fp0.addOption("NYSE"); fp0.addOption("NASDAQ"); fp0.setDefault("NYSE"); } var volRatio; function main(market){ if (market=="NYSE") {volRatio=((close("$UVOL")/close("$DVOL"))*100).toFixed(2);} else {volRatio=((close("$UVOLQ")/close("$DVOLQ"))*100).toFixed(2);} if (volRatio < 100) {setBarFgColor(Color.red,0);} return new Array (volRatio); }
Comment