Posted By: Gheo
MultiCycle backtest report? - 01/20/23 01:55
I am currently working on a script for Zorro that runs a strategy using random walk cycles, similar to the MRC.c script.
I am particularly interested in the text report generated by Zorro and would like to find a way to consolidate the results of multiple cycles into a single report.
Currently, my script produces one report per cycle.
I am looking for ways to display statistics that are more meaningful to me from all test cycles than the bar graph produced by MRC.c,
and also to know if it is possible to edit the formatting of the text report generated by Zorro or add additional fields.
Any help or suggestions would be greatly appreciated.
I am particularly interested in the text report generated by Zorro and would like to find a way to consolidate the results of multiple cycles into a single report.
Currently, my script produces one report per cycle.
I am looking for ways to display statistics that are more meaningful to me from all test cycles than the bar graph produced by MRC.c,
and also to know if it is possible to edit the formatting of the text report generated by Zorro or add additional fields.
Any help or suggestions would be greatly appreciated.
Code
////////////////////////////////////////////////// #include <profile.c> #define run strategy #include "Android_19.c" // <= your script #undef run #define CYCLES 10 function run() { set(INITRUN|TESTNOW|LOGFILE); // for training NumCores = 3; // set desired number of cpu cores up to 72 setf(PlotMode,PL_FINE+PL_DIFF+PL_LONG+PL_ALL+PL_BENCHMARK); //+PL_ALLTRADES PlotScale = 8; NumTotalCycles = CYCLES; LogNumber = TotalCycle; // used to generate logs for each backtest cycle #ifdef RANDOMIZE Detrend = RANDOMWALK; set(PRELOAD); #endif strategy(); if(TotalCycle <= NumTotalCycles-1) { plot(strf("Randomwalk%d", TotalCycle),priceOpen(),MAIN|LINE,GREY); /* if(OpenBuys[0] > OpenBuys[2]) {plot(strf("Buy%d",TotalCycle),priceOpen(),MAIN|TRIANGLE,color(100*TotalCycle/NumTotalCycles,BLUE,YELLOW,GREEN,SILVER));} // plots triangles where Buy orders will be enterd on each randomwalk cycle if(OpenSells[0] > OpenSells[2]) {plot(strf("Sell%d",TotalCycle),priceOpen(),MAIN|TRIANGLE4,color(100*TotalCycle/NumTotalCycles,RED,PURPLE,ORANGE,MAGENTA));} // plots triangles where Sell orders will be enterd on each randomwalk cycle plot(strf("DrawDown%d",TotalCycle),(DrawDownMax*-1),NEW|LINE,color(100*TotalCycle/NumTotalCycles,RED,MAGENTA,PURPLE,ORANGE)); // plots new chart DrawDown for each randomwalk cycle plot(strf("Equity%d",TotalCycle),Equity,LINE,color(100*TotalCycle/NumTotalCycles,BLUE,CYAN,YELLOW,GREEN)); // plots Equity for each randomwalk cycle plot(strf("Balance%d",TotalCycle),Balance,LINE,GREEN+TRANSP); // plots Balance for each randomwalk cycle */ } }