I seem to have fixed the problem but still don't understand the reason in the library function conzone was build by looping through the bars and setting each conzone[i], and then returning conzone.
that was fine in normal backtesting. now for custom backtester it gave conzone not initialized error until i added at beginning of lib function a conzone = 0; statement. Now it works in custom backtester. If somebody knows the reasons for this would be nice to understand. ________________________________ From: wolfie125 <[email protected]> To: [email protected] Sent: Sat, January 9, 2010 2:50:43 PM Subject: [amibroker] Problem with custom backtester Hi I am backtesting a system with the normal backtester no problems. I want to add some position sizing details, so need to use the custom backtester. Currently it uses a library by calling #include_once at the start. One of the functions in that library references different timeframes and works well currently. The moment i add SetOption("UseCusto mBacktestProc" , True ); at the start of my code and obviously even with the rest of custom backtester code or without, it seems that this library function becomes a problem. it usually has a return value called conzone. Now the code the piece of code -> return conzone <- in the library file generates error 29 variable conzone used without having been initialized. Any ideas of what could have caused this will REALLY be appreciated
