[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] Re: customization of backtesting results



PureBytes Links

Trading Reference Links



Hi Mike,

below is what I wanted to do. It is working fine. Thank you.

Could you help me to code this:

Have new column in backtesting result window that would be my own variable. And it would look like MA(ROC(Ref(C,-1),1),5)

Is there any easy way? Could it be let's say the fourth column?

Thank you,

Radek

          
If you are planning on having many custom backtest implementations, but few systems, then you can update System.afl to #include whichever custom backtest you want to test, then run the Ssytem.afl script. Any variables required by the custom backtester would be expected to be passed as procedure parameters.

System.afl

#include <CustomBacktest.afl>

Buy = DayOfWeek() == 1
;
Sell = DayOfWeek() == 5
;
MyBackTestVar =
true
;

SetCustomBacktestProc(""
);

if (Status("action") == actionPortfolio
) {
   RunCustomBackTest(MyBackTestVar);

Custom_Backtesting.afl

procedure RunCustomBackTest(Var) {
   
if (Var) {
      
_TRACE("Var was true.");
   }
else {
      
_TRACE("Var was false.");
   }

   bo =
GetBacktesterObject();
   bo.Backtest();

   
// Add custom metrics here...
}

Mike





__._,_.___


**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/





Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___