Can I back test a system across multiple securities at the same time? How?
Can I back test multiple systems across multiple securities? How?
Can I back test multiple systems across multiple securities? How?
var study = null;
function main([b]nLength[/b]) {
if(nLength == null)
nLength = 10;
if(study == null)
study = new MAStudy(nLength, ....);
// do backtesting stuff
}
function preMain() {
var o1 = new ParameterNumericOption("nLength");
var o2 = new ParameterBooleanOption("bDoSomething");
var o3 = new ParameterStringOption("sSomethingElse");
o1.setLowerLimit(0);
o1.setUpperLimit(100);
o1.setDefault(10);
o1.setOtherOptions(...);
o3.addOption("Open", true ); // true means default selection
o3.addOption("High");
o3.addOption("Low");
o3.addOption("Close");
}
function main(nLength, bDoSomething, sSomethingElse) {
...
}
function getParameterInfo(nParameterNumber, sParameterName) {
if(sParameterName == "nLength") {
var o = new ParameterNumericOption();
...
return o;
}
// Or you could do it this way.
if(nParameterName == 1) {
var o = new ParameterNumericOption();
...
return o;
}
}
Comment