Hi Folks,
Could someone help me to resolve this problem?
Problem: Sum volume of "XJO-ASX" component shares
Error Message : Symbol Limit(7) for a formula has been exceeded
Code:
/*************************
Description: Displays volume with moving average
*/
var study = null;
function preMain() {
setStudyTitle("ASX Vol_MA");
setCursorLabelName("Volume",0);
setCursorLabelName("MA",1);
setPlotType(PLOTTYPE_HISTOGRAM,0);
}
var vMAArray = new Array();
function main(nMALength) {
if (nMALength == null) {
nMALength = 10;
}
else {
nMALength = Math.round(nMALength);
}
// Get data
var vVol = volume("ABB-ASX") +
volume("ABC-ASX") +
volume("ABP-ASX") +
volume("ABS-ASX") +
volume("AED-ASX") +
volume("AEZ-ASX") +
volume("AFG-ASX") +
volume("AGK-ASX") +
volume("AGO-ASX") +
volume("AIO-ASX") +
volume("AIX-ASX") +
volume("ALL-ASX") +
volume("ALS-ASX") +
volume("ALZ-ASX") +
volume("AMC-ASX") +
volume("AMP-ASX") +
volume("ANN-ASX") +
volume("ANZ-ASX") +
volume("AOE-ASX") +
volume("APA-ASX") +
volume("APN-ASX") +
volume("AQP-ASX") +
volume("ASX-ASX") +
volume("AUN-ASX") +
volume("AUW-ASX") +
volume("AWB-ASX") +
volume("AWC-ASX") +
volume("AWE-ASX") +
volume("AXA-ASX") +
volume("BBG-ASX") +
volume("BBI-ASX") +
volume("BBP-ASX") +
volume("BBW-ASX") +
volume("BCM-ASX") +
volume("BEN-ASX") +
volume("BHP-ASX") +
volume("BJT-ASX") +
volume("BKN-ASX") +
volume("BLD-ASX") +
volume("BLY-ASX") +
volume("BNQ-ASX") +
volume("BOQ-ASX") +
volume("BPT-ASX") +
volume("BSL-ASX") +
volume("BWP-ASX") +
volume("BXB-ASX") +
volume("CAB-ASX") +
volume("CBA-ASX") +
volume("CCL-ASX") +
volume("CER-ASX") +
volume("CEU-ASX") +
volume("CEY-ASX") +
volume("CFX-ASX") +
volume("CGF-ASX") +
volume("CMJ-ASX") +
volume("CNP-ASX") +
volume("COH-ASX") +
volume("CPA-ASX") +
volume("CRG-ASX") +
volume("CSL-ASX") +
volume("CSR-ASX") +
volume("CTX-ASX") +
volume("CWN-ASX") +
volume("CXC-ASX") +
volume("CXP-ASX") +
volume("DJS-ASX") +
volume("DOW-ASX") +
volume("DUE-ASX") +
volume("DXS-ASX") +
volume("EHL-ASX") +
volume("ENV-ASX") +
volume("EQN-ASX") +
volume("ERA-ASX") +
volume("FCL-ASX") +
volume("FGL-ASX") +
volume("FKP-ASX") +
volume("FLT-ASX") +
volume("FLX-ASX") +
volume("FMG-ASX") +
volume("FXJ-ASX") +
volume("GFF-ASX") +
volume("GMG-ASX") +
volume("GNS-ASX") +
volume("GPT-ASX") +
volume("GTP-ASX") +
volume("GUD-ASX") +
volume("GWT-ASX") +
volume("HDF-ASX") +
volume("HGI-ASX") +
volume("HIL-ASX") +
volume("HSP-ASX") +
volume("HVN-ASX") +
volume("IAG-ASX") +
volume("IFL-ASX") +
volume("IGO-ASX") +
volume("IIF-ASX") +
volume("ILU-ASX") +
volume("IOF-ASX")
;
var vOpen = open();
var vClose = close();
if (vVol == null) return;
var nBarState = getBarState();
if (nBarState == BARSTATE_NEWBAR) {
vMAArray.unshift(vVol);
}
vMAArray[0] = vVol;
if (vMAArray[nMALength-1] != null) {
var vSum = 0;
for (i=0; i <= nMALength-1; i++) {
vSum += vMAArray[i];
}
var vMAofVol = vSum / nMALength;
} else return;
if (vOpen <= vClose) setBarFgColor(Color.green, 0);
if (vOpen > vClose) setBarFgColor(Color.red, 0);
return new Array (vVol, vMAofVol);
}
Request: Error message indicates that there is a limit on symbols for formula. Is it possible to increase that limit? or are there any alternative methods to get the aggregate volume of xjo-asx components?
Thanks
bizken
Could someone help me to resolve this problem?
Problem: Sum volume of "XJO-ASX" component shares
Error Message : Symbol Limit(7) for a formula has been exceeded
Code:
/*************************
Description: Displays volume with moving average
*/
var study = null;
function preMain() {
setStudyTitle("ASX Vol_MA");
setCursorLabelName("Volume",0);
setCursorLabelName("MA",1);
setPlotType(PLOTTYPE_HISTOGRAM,0);
}
var vMAArray = new Array();
function main(nMALength) {
if (nMALength == null) {
nMALength = 10;
}
else {
nMALength = Math.round(nMALength);
}
// Get data
var vVol = volume("ABB-ASX") +
volume("ABC-ASX") +
volume("ABP-ASX") +
volume("ABS-ASX") +
volume("AED-ASX") +
volume("AEZ-ASX") +
volume("AFG-ASX") +
volume("AGK-ASX") +
volume("AGO-ASX") +
volume("AIO-ASX") +
volume("AIX-ASX") +
volume("ALL-ASX") +
volume("ALS-ASX") +
volume("ALZ-ASX") +
volume("AMC-ASX") +
volume("AMP-ASX") +
volume("ANN-ASX") +
volume("ANZ-ASX") +
volume("AOE-ASX") +
volume("APA-ASX") +
volume("APN-ASX") +
volume("AQP-ASX") +
volume("ASX-ASX") +
volume("AUN-ASX") +
volume("AUW-ASX") +
volume("AWB-ASX") +
volume("AWC-ASX") +
volume("AWE-ASX") +
volume("AXA-ASX") +
volume("BBG-ASX") +
volume("BBI-ASX") +
volume("BBP-ASX") +
volume("BBW-ASX") +
volume("BCM-ASX") +
volume("BEN-ASX") +
volume("BHP-ASX") +
volume("BJT-ASX") +
volume("BKN-ASX") +
volume("BLD-ASX") +
volume("BLY-ASX") +
volume("BNQ-ASX") +
volume("BOQ-ASX") +
volume("BPT-ASX") +
volume("BSL-ASX") +
volume("BWP-ASX") +
volume("BXB-ASX") +
volume("CAB-ASX") +
volume("CBA-ASX") +
volume("CCL-ASX") +
volume("CER-ASX") +
volume("CEU-ASX") +
volume("CEY-ASX") +
volume("CFX-ASX") +
volume("CGF-ASX") +
volume("CMJ-ASX") +
volume("CNP-ASX") +
volume("COH-ASX") +
volume("CPA-ASX") +
volume("CRG-ASX") +
volume("CSL-ASX") +
volume("CSR-ASX") +
volume("CTX-ASX") +
volume("CWN-ASX") +
volume("CXC-ASX") +
volume("CXP-ASX") +
volume("DJS-ASX") +
volume("DOW-ASX") +
volume("DUE-ASX") +
volume("DXS-ASX") +
volume("EHL-ASX") +
volume("ENV-ASX") +
volume("EQN-ASX") +
volume("ERA-ASX") +
volume("FCL-ASX") +
volume("FGL-ASX") +
volume("FKP-ASX") +
volume("FLT-ASX") +
volume("FLX-ASX") +
volume("FMG-ASX") +
volume("FXJ-ASX") +
volume("GFF-ASX") +
volume("GMG-ASX") +
volume("GNS-ASX") +
volume("GPT-ASX") +
volume("GTP-ASX") +
volume("GUD-ASX") +
volume("GWT-ASX") +
volume("HDF-ASX") +
volume("HGI-ASX") +
volume("HIL-ASX") +
volume("HSP-ASX") +
volume("HVN-ASX") +
volume("IAG-ASX") +
volume("IFL-ASX") +
volume("IGO-ASX") +
volume("IIF-ASX") +
volume("ILU-ASX") +
volume("IOF-ASX")
;
var vOpen = open();
var vClose = close();
if (vVol == null) return;
var nBarState = getBarState();
if (nBarState == BARSTATE_NEWBAR) {
vMAArray.unshift(vVol);
}
vMAArray[0] = vVol;
if (vMAArray[nMALength-1] != null) {
var vSum = 0;
for (i=0; i <= nMALength-1; i++) {
vSum += vMAArray[i];
}
var vMAofVol = vSum / nMALength;
} else return;
if (vOpen <= vClose) setBarFgColor(Color.green, 0);
if (vOpen > vClose) setBarFgColor(Color.red, 0);
return new Array (vVol, vMAofVol);
}
Request: Error message indicates that there is a limit on symbols for formula. Is it possible to increase that limit? or are there any alternative methods to get the aggregate volume of xjo-asx components?
Thanks
bizken
Comment