so imagin.: you have writen a buy and sell entry.
and you have a bunch of exit parts :
exit 1: ema cross
exit 2: take profit
exit 3: atr stoploss
...
as inputs i set:
emacrossexit = true
takeproiftexit = true
atrstoploss = true
then i turn them true or false to test each of them seperately running a backtest..
is there a way to automate this ?
since true or false is not allowed to change in the backtest.
regards
1 backtest to test a bunch of exit methods..
Re: 1 backtest to test a bunch of exit methods..
i think something like this is simple and works:
then manual test or optimize every step from 1 to 3 (exaustive).
Code: Select all
input: exit_strategy(0);
if exit_strategy = 1 then
begin
ema cross code;
end
else if exit_strategy = 2 then
begin
takeprofit code;
end
else if exit_strategy = 3 then
begin
atrstop code;
end;