Dear eSignal Support Team and eSignal Community,
I am having an issue with a Backtest I wrote that seems to work perfectly well, when I apply the strategy to a chart, but when I try to use the Chart --> Show Back Test Report function, I keep getting the following error message:
"Internal error occurs. Try recalculate report."
If I try to recalculate the report, the same error appears. No further explanation is offered for why this error occurs, and my code doesn't seem to be complicated at all, so I am really stuck. I would like to optimize my strategy further, but without the Back Test Report that is rather difficult.
Below is the code of the strategy:
Has anybody seen similar issues with Internal Errors for Back Test Reports? As the error message doesn't offer any further explanation, I am gratefuly for any help why this sort of error could appear.
I am using eSignal On Demand version 11.6 SP2 (11.6.3167.1081 64-bit)
Kind regards,
panta-rhei
I am having an issue with a Backtest I wrote that seems to work perfectly well, when I apply the strategy to a chart, but when I try to use the Chart --> Show Back Test Report function, I keep getting the following error message:
"Internal error occurs. Try recalculate report."
If I try to recalculate the report, the same error appears. No further explanation is offered for why this error occurs, and my code doesn't seem to be complicated at all, so I am really stuck. I would like to optimize my strategy further, but without the Back Test Report that is rather difficult.
Below is the code of the strategy:
Code:
function preMain() { setPriceStudy(false); setColorPriceBars(true); setDefaultPriceBarColor(Color.grey); setStudyTitle("MA of B%"); setCursorLabelName("vB%", 0); setCursorLabelName("vGD10", 1); setCursorLabelName("vEMA8", 2); setDefaultBarFgColor(Color.RGB(0xFE,0x00,0x6D), 0); setDefaultBarFgColor(Color.RGB(0x00,0x94,0xFF), 1); setDefaultBarFgColor(Color.RGB(0xFE,0x69,0x00), 2); setDefaultBarStyle(PS_SOLID, 0); setDefaultBarStyle(PS_SOLID, 1); setDefaultBarStyle(PS_SOLID, 2); setDefaultBarThickness(1,0); setDefaultBarThickness(1,1); setDefaultBarThickness(1,2); setPlotType(PLOTTYPE_LINE,0); setPlotType(PLOTTYPE_LINE,1); setPlotType(PLOTTYPE_LINE,2); } var vBollinger20_U = upperBB(20,2); var vBollinger20_L = lowerBB(20,2); var vSMA10 = sma(10); var vEMA8 = ema(8); var vSMA10_of_vBollinger20_1 = sma(10,vBollinger20_U); var vSMA10_of_vBollinger20_2 = sma(10,vBollinger20_L); var vEMA8_of_vBollinger20_1 = ema(8,vBollinger20_U); var vEMA8_of_vBollinger20_2 = ema(8,vBollinger20_L); function main() { if (getBarState() == BARSTATE_ALLBARS) { return null; } var vUpper = vBollinger20_U.getValue(0); var vLower = vBollinger20_L.getValue(0); var vLast = close(0); var vUpper_Previous = vBollinger20_U.getValue(-1); var vLower_Previous = vBollinger20_L.getValue(-1); var vLast_Previous = close(-1); var vSMA_Upper = vSMA10_of_vBollinger20_1.getValue(0); var vSMA_Lower = vSMA10_of_vBollinger20_2.getValue(0); var vSMA = vSMA10.getValue(0); var vEMA_Upper = vEMA8_of_vBollinger20_1.getValue(0); var vEMA_Lower = vEMA8_of_vBollinger20_2.getValue(0); var vEMA = vEMA8.getValue(0); var vB_Percent = (vLast - vLower) / (vUpper - vLower) * 100; var vB_Percent_Previous = (vLast_Previous - vLower_Previous) / (vUpper_Previous - vLower_Previous) * 100 var vSMA_of_B_Percent = (vSMA - vSMA_Lower) / (vSMA_Upper - vSMA_Lower) * 100; var vEMA_of_B_Percent = (vEMA - vEMA_Lower) / (vEMA_Upper - vEMA_Lower) * 100; if (vUpper == null || vLower == null || vLast == null || vSMA_Upper == null || vSMA_Lower == null || vSMA == null || vEMA_Upper == null || vEMA_Lower == null || vEMA == null) return; if (Strategy.isLong() == false) { if ( ( (vB_Percent > vSMA_of_B_Percent) || (vB_Percent > vEMA_of_B_Percent) ) && (vB_Percent < 20) ) { Strategy.doLong("PercentB EMA/SMA Long Signal", Strategy.MARKET, Strategy.NEXTBAR); Alert.addToList (getSymbol(), "B% Bull Cross EMA/SMA: Bull Entry", Color.green, Color.black); }; } else if (Strategy.isLong() == true) { if ( (vB_Percent < vB_Percent_Previous) && (vB_Percent > 80) ) { Strategy.doSell("PercentB Exit Signal", Strategy.MARKET, Strategy.NEXTBAR); Alert.addToList (getSymbol(), "B% Bull Cross EMA/SMA: Exit", Color.grey, Color.black); }; }; if (Strategy.isShort() == false) { if ( ( (vB_Percent < vSMA_of_B_Percent) || (vB_Percent < vEMA_of_B_Percent) ) && (vB_Percent > 80) ) { Strategy.doShort("PercentB EMA/SMA Short Signal", Strategy.MARKET, Strategy.NEXTBAR); Alert.addToList (getSymbol(), "B% Bear Cross EMA/SMA: Bear Entry", Color.red, Color.black); }; } else if (Strategy.isShort() == true) { if ( (vB_Percent > vB_Percent_Previous) && (vB_Percent < 20) ) { Strategy.doCover("PercentB Cover Signal", Strategy.MARKET, Strategy.NEXTBAR); Alert.addToList (getSymbol(), "B% Bear Cross EMA/SMA: Exit", Color.grey, Color.black); }; }; if (Strategy.isLong()) { setPriceBarColor(Color.darkgreen); }; if (Strategy.isShort()) { setPriceBarColor(Color.maroon); }; return new Array( vB_Percent, vSMA_of_B_Percent, vEMA_of_B_Percent, 20, 80 ); }
I am using eSignal On Demand version 11.6 SP2 (11.6.3167.1081 64-bit)
Kind regards,
panta-rhei
Comment