I'm trying to join 2 or more strategy's algorithms in only one, having a bool flag to activate an deactivate each individual algorithm. Each algorithm runs on its own timeframe bars, and execute EnterLong/Short with uniquely named signals (different from other algorithms). The global strategy gives correct executions/tradings when only one of the algorithms is activated, i.e. the results are the same of the independent strategy being added to the global one. But when two or more algorithms are activated, the trades executions are very strange, accumulating too much executions on consecutive bars from time to time, and giving a result of executions that are very different from the sum of each independent algorithm.
I have tried adjusting the Order Handling parameters to Entries per direction=1 and Entry handling=UniqueEntries, but results makes non sense.
Thank you very much for your help and suggestions in advance.
Follow an example of executions and the parameters for the backtest(for the last run with the 2 true flags activated):
algorithm 1 activated:
Executions:
Instrument Action Qty Price Time ID E/X Position Order ID Name Commission Rate Account Connection
FDAX 03-09 Buy 1 5022 06/01/2009 8:05 NT-00000 Entry 1L NT-00000 VMA1 0 1 Back101
FDAX 03-09 Sell 1 4967,5 07/01/2009 14:45 NT-00001 Exit - NT-00001 Close position 0 1 Back101
FDAX 03-09 Sell 1 4967,5 07/01/2009 14:45 NT-00002 Entry 1S NT-00002 VMA1 0 1 Back101
FDAX 03-09 Buy 1 4506 28/01/2009 14:40 NT-00003 Exit - NT-00003 Close position 0 1 Back101
FDAX 03-09 Buy 1 4506 28/01/2009 14:40 NT-00004 Entry 1L NT-00004 VMA1 0 1 Back101
FDAX 03-09 Sell 1 4462,5 29/01/2009 10:30 NT-00005 Exit - NT-00005 Close position 0 1 Back101
FDAX 03-09 Sell 1 4462,5 29/01/2009 10:30 NT-00006 Entry 1S NT-00006 VMA1 0 1 Back101
FDAX 03-09 Buy 1 4466 04/02/2009 15:50 NT-00007 Exit - NT-00007 Close position 0 1 Back101
FDAX 03-09 Buy 1 4466 04/02/2009 15:50 NT-00008 Entry 1L NT-00008 VMA1 0 1 Back101
FDAX 03-09 Sell 1 4420 05/02/2009 8:55 NT-00009 Exit - NT-00009 Close position 0 1 Back101
FDAX 03-09 Sell 1 4420 05/02/2009 8:55 NT-00010 Entry 1S NT-00010 VMA1 0 1 Back101
FDAX 03-09 Buy 1 4459,5 05/02/2009 11:00 NT-00011 Exit - NT-00011 Close position 0 1 Back101
FDAX 03-09 Buy 1 4459,5 05/02/2009 11:00 NT-00012 Entry 1L NT-00012 VMA1 0 1 Back101
FDAX 03-09 Sell 1 4408 05/02/2009 16:15 NT-00013 Exit - NT-00013 Close position 0 1 Back101
FDAX 03-09 Sell 1 4408 05/02/2009 16:15 NT-00014 Entry 1S NT-00014 VMA1 0 1 Back101
FDAX 03-09 Buy 1 4483,5 05/02/2009 17:00 NT-00015 Exit - NT-00015 Close position 0 1 Back101
FDAX 03-09 Buy 1 4483,5 05/02/2009 17:00 NT-00016 Entry 1L NT-00016 VMA1 0 1 Back101
FDAX 03-09 Sell 1 4474,5 10/02/2009 20:20 NT-00017 Exit - NT-00017 Close position 0 1 Back101
FDAX 03-09 Sell 1 4474,5 10/02/2009 20:20 NT-00018 Entry 1S NT-00018 VMA1 0 1 Back101
FDAX 03-09 Buy 1 4519,5 11/02/2009 9:50 NT-00019 Exit - NT-00019 Close position 0 1 Back101
FDAX 03-09 Buy 1 4519,5 11/02/2009 9:50 NT-00020 Entry 1L NT-00020 VMA1 0 1 Back101
FDAX 03-09 Sell 1 4462 12/02/2009 9:35 NT-00021 Exit - NT-00021 Close position 0 1 Back101
FDAX 03-09 Sell 1 4462 12/02/2009 9:35 NT-00022 Entry 1S NT-00022 VMA1 0 1 Back101
FDAX 03-09 Buy 1 3649 09/03/2009 21:25 NT-00023 Exit - NT-00023 Exit on close 0 1 Back101
algorithm 2 activated:
Executions:
Instrument Action Qty Price Time ID E/X Position Order ID Name Commission Rate Account Connection
FDAX 03-09 Buy 1 5011,5 06/01/2009 8:45 NT-00000 Entry 1L NT-00000 EMA1 0 1 Back101
FDAX 03-09 Sell 1 4984,5 06/01/2009 9:30 NT-00001 Exit - NT-00001 Close position 0 1 Back101
FDAX 03-09 Sell 1 4984,5 06/01/2009 9:30 NT-00002 Entry 1S NT-00002 EMA1 0 1 Back101
FDAX 03-09 Buy 1 5017,5 06/01/2009 10:10 NT-00003 Exit - NT-00003 Close position 0 1 Back101
FDAX 03-09 Buy 1 5017,5 06/01/2009 10:10 NT-00004 Entry 1L NT-00004 EMA1 0 1 Back101
FDAX 03-09 Sell 1 4988 07/01/2009 9:45 NT-00005 Exit - NT-00005 Close position 0 1 Back101
FDAX 03-09 Sell 1 4988 07/01/2009 9:45 NT-00006 Entry 1S NT-00006 EMA1 0 1 Back101
FDAX 03-09 Buy 1 4483,5 04/02/2009 16:00 NT-00007 Exit - NT-00007 Close position 0 1 Back101
FDAX 03-09 Buy 1 4483,5 04/02/2009 16:00 NT-00008 Entry 1L NT-00008 EMA1 0 1 Back101
FDAX 03-09 Sell 1 4448,5 04/02/2009 19:55 NT-00009 Exit - NT-00009 Close position 0 1 Back101
FDAX 03-09 Sell 1 4448,5 04/02/2009 19:55 NT-00010 Entry 1S NT-00010 EMA1 0 1 Back101
FDAX 03-09 Buy 1 4472 05/02/2009 11:35 NT-00011 Exit - NT-00011 Close position 0 1 Back101
FDAX 03-09 Buy 1 4472 05/02/2009 11:35 NT-00012 Entry 1L NT-00012 EMA1 0 1 Back101
FDAX 03-09 Sell 1 4434,5 05/02/2009 14:40 NT-00013 Exit - NT-00013 Close position 0 1 Back101
FDAX 03-09 Sell 1 4434,5 05/02/2009 14:40 NT-00014 Entry 1S NT-00014 EMA1 0 1 Back101
FDAX 03-09 Buy 1 4483,5 05/02/2009 17:00 NT-00015 Exit - NT-00015 Close position 0 1 Back101
FDAX 03-09 Buy 1 4483,5 05/02/2009 17:00 NT-00016 Entry 1L NT-00016 EMA1 0 1 Back101
FDAX 03-09 Sell 1 4392,5 12/02/2009 16:05 NT-00017 Exit - NT-00017 Close position 0 1 Back101
FDAX 03-09 Sell 1 4392,5 12/02/2009 16:05 NT-00018 Entry 1S NT-00018 EMA1 0 1 Back101
FDAX 03-09 Buy 1 3649 09/03/2009 21:25 NT-00019 Exit - NT-00019 Exit on close 0 1 Back101

Comment