Next big release (AmiBroker 7.x) wish list

A post was merged into an existing topic: Will Amibroker develop add-on for connecting prop trade firm

A post was merged into an existing topic: Will Amibroker develop add-on for connecting prop trade firm

The more bullet proof way is to keep guard_code in an AFL and include in all your APXs(AFL), my sample is a bit primitive from what I use, but this works better for all cases to prevent accidental execution.

isHoliday = CheckHolidayToday(); // my custom func
DoW = LastValue( dayofweek() );
isWeekEnd = DoW==0 OR DoW==6;

if( Now(4) < 91500 OR Now(4) > 153000 OR isWeekEnd OR isHoliday 
    OR NOT Status("actionIndicator") ) {
    _exit();
}

You can add more customization to test if Name() is a Futures, OR in a specific Category like WL/Market to allow in extended hours etc.
You can also make a few variations and use them differently for different use cases.

1 Like

Thank you for the suggestion and example code.

1 Like

Hi @Tomasz. Im still on the learning phase but coming from a few others platforms, Im quite impressed with the level of customization, features and speed of Amibroker. Very likely this will be my main platform from now on (Algotrading). Congratulations!!! There is one thing missing that I use in my workflow, It would be incredible to have a WFA Cluster/Matrix backtest, (Various n Runs and OOS %) similar to other platforms. Combined with Amibroker’s speed, capabilities and customization, it would be an exceptionally powerful solution and at the same time bringing value to the platform. Thank you.

Add connection to BINANCE for live market data, that would be great.

Please add the possibility of maintaining a static parameter without having to add a new line of code by use of 0 in the Optimization step.
Ex.: variable = Optimize("variable", 14, 1, 30, 0);

For that you use Param() not Optimize() call.

variable = Param("variable", 14, 1, 30 );

The purpose of optimization is to find single optimum value from range of allowed values. If you have 'static' parameter, then you don't need Optimize() call at all.

1 Like

After optimization, some parameters should remain static for WFA. Currently this requires commenting out Optimize() and replacing it with a hard-coded value. Allowing Step = 0 in Optimize() would make this an easier and less workload flow.

Just to be sure that we are on the same page.

In Walk-Forward Analysis you have TWO phases:

  1. In-sample optimization - where best (optimum) parameter set is found
  2. Out-of-sample backtest - when parameters from in-sample are FROZEN (static as you call) automatically

So ALL parameters are fixed/frozen in out-of-sample WFA phase.
That is how it works already.

Bottom line is I don't know what you are after when you say to have "some" paramters fixed in WFA.

1 Like

Ok Tomasz, you are completely right in what you are saying but I can see that we are not on the same page. I didn't explain myself properly.

This is one potential flow:

  1. Run Optimization for general filters and setting that work, on a certain block of time. (exploration of possibilities).
  2. Fix Some of them (like filters types for instance)
  3. Run WFA on Full history data with the above filters fixed and settings with wiggle room.

When I go from phase 1 to 2, I need to make some parameters static (that were optimized before) and leave others still "Optimizable".

In order to do this I need to comment the Optimize line and create a new one to make it static like this for example:

// filter = Optimize(1, 1, 10, 1);
filter = 5;

If I was able to do this (without having to add another line) it would make the workflow faster, easier and it would not hurt any of the AFL logic.

filter = Optimize(5, 1, 10, 0);

Thanks for your time and help.

OK, now I understand what you are after. In this case you can achieve it quite simply by defining your own optimize function

function MyOptimize( nam, def, minv, maxv, step )
{
   retval = def;

   if( step > 0 ) retval = Optimize( nam, def, minv, maxv, step );

   return retval;
}

And later just use MyOptimize()

1 Like

Alright! That's an awesome solution. I just hope it won't degrade performance significantly :sweat_smile:. Thanks.

It will have zero impact on performance.

1 Like

Perfect!! :+1:t3: Thanks