I am just getting my feet wet with the Back Testing feature and I am not making any headway. I have copied the efs from the Knowledge base verbatim:
var study = new MAStudy(40, 0, "Close", MAStudy.SIMPLE);
function preMain() {
setPriceStudy(true);
setColorPriceBars(true);
setDefaultPriceBarColor(Color.black);
}
function main() {
var v = study.getValue(MAStudy.MA);
if(v == null) return;
if(close() >= v && !Strategy.isLong())
Strategy.doLong("Crossing Up", Strategy.MARKET, Strategy.THISBAR);
if(close() <= v && !Strategy.isShort())
Strategy.doShort("Crossing Down", Strategy.MARKET, Strategy.THISBAR);
if(Strategy.isLong()) setPriceBarColor(Color.lime);
else if(Strategy.isShort()) setPriceBarColor(Color.red);
return v;
}
I opened an Advanced Chart w/ ES #F on a 60 minute interval. When I click Tools->Back Testing and load this formula I immediately get the Strategy Analysis window with no information; then I changed the chart to a 1 min interval and the back testing interval to 1 minute and click test and things go off into never never land and when it returns I still have no results. At one point I was getting the dialog indicating that it was retreiving 0 rows and that I let run for 20 minutes and still no rows had been read and no results were returned.
Is there some magic pixie dust that I am missing ? And if so, where do I get it ?
I have been through the documentation and I just don't seem to be getting it.
Thanks -
Jennifer
var study = new MAStudy(40, 0, "Close", MAStudy.SIMPLE);
function preMain() {
setPriceStudy(true);
setColorPriceBars(true);
setDefaultPriceBarColor(Color.black);
}
function main() {
var v = study.getValue(MAStudy.MA);
if(v == null) return;
if(close() >= v && !Strategy.isLong())
Strategy.doLong("Crossing Up", Strategy.MARKET, Strategy.THISBAR);
if(close() <= v && !Strategy.isShort())
Strategy.doShort("Crossing Down", Strategy.MARKET, Strategy.THISBAR);
if(Strategy.isLong()) setPriceBarColor(Color.lime);
else if(Strategy.isShort()) setPriceBarColor(Color.red);
return v;
}
I opened an Advanced Chart w/ ES #F on a 60 minute interval. When I click Tools->Back Testing and load this formula I immediately get the Strategy Analysis window with no information; then I changed the chart to a 1 min interval and the back testing interval to 1 minute and click test and things go off into never never land and when it returns I still have no results. At one point I was getting the dialog indicating that it was retreiving 0 rows and that I let run for 20 minutes and still no rows had been read and no results were returned.
Is there some magic pixie dust that I am missing ? And if so, where do I get it ?
I have been through the documentation and I just don't seem to be getting it.
Thanks -
Jennifer
Comment