1 backtest to test a bunch of exit methods..

Questions about MultiCharts and user contributed studies.
bjornc
Posts: 18
Joined: 11 Dec 2013
Has thanked: 4 times
Been thanked: 2 times

1 backtest to test a bunch of exit methods..

Postby bjornc » 25 Jul 2015

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

GiuseppeM
Posts: 20
Joined: 21 Jul 2015
Has thanked: 2 times
Been thanked: 1 time

Re: 1 backtest to test a bunch of exit methods..

Postby GiuseppeM » 25 Jul 2015

i think something like this is simple and works:

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;
then manual test or optimize every step from 1 to 3 (exaustive).

bjornc
Posts: 18
Joined: 11 Dec 2013
Has thanked: 4 times
Been thanked: 2 times

Re: 1 backtest to test a bunch of exit methods..

Postby bjornc » 25 Jul 2015

i'll have a go with this.. thanks


Return to “MultiCharts”