Backtester/Optimiser not matching with same parameters

Created at 09 Oct 2024, 10:25
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
DA

davidrob

Joined 15.08.2024

Backtester/Optimiser not matching with same parameters
09 Oct 2024, 10:25


Hello,
I am posting here as I anticipate I will be told to in the ClickAlgo forum. I am having the same issue as many others at ClickAlgo. I see multiple discussions about Backtester/Optimiser disparities for the last several years. It seems some experience this issue, some don't.  I am running  v5.0.38.32105 with BlackBull Markets.  I am learning the Ctrader system, and I downloaded the MacD RSI cBot to get started. Having done lots of backtesting before, and watching multiple CTrader/ClickAlgo videos, I got the CTrader system more or less figured out, or so I thought.  Straight out of the box, I changed nothing and played with the Backtester-Optimiser.
Optimise - Apply - Backtest without changing anything as ClickAlgo Mike says above, should result in identical results, which was my expectation.
But like many others, not for me. More tests this evening and I just cannot get a match.  So that I can proceed, trusting the system, can you tell me which result should I believe? The Optimiser or the Backtester? I am Optimistic it is the Optimiser! The issues is not whether or not this is a bug, the issue is about carrying on and trusting CTrader one way or another, or finding out if I have missed something crucial. THANKS your help.


@davidrob
Replies

PanagiotisCharalampous
09 Oct 2024, 12:19

Hi there,

Make sure that the backtesting settings are the same. 99% of the times it happened this to me it was caused by some oversight in my backtesing settings. If there is still a problem, then we will need to following information in order to reproduce the problem

  • cBot code
  • Optimization parameters file, symbol, timeframe and dates
  • The exact set of parameters for which the discrepancy is observed

Best regards,

Panagiotis


@PanagiotisCharalampous

davidrob
10 Oct 2024, 03:56 ( Updated at: 10 Oct 2024, 06:52 )

RE: Backtester/Optimiser not matching with same parameters

PanagiotisCharalampous said: 

Hi there,

Make sure that the backtesting settings are the same. 99% of the times it happened this to me it was caused by some oversight in my backtesing settings. If there is still a problem, then we will need to following information in order to reproduce the problem

  • cBot code
  • Optimization parameters file, symbol, timeframe and dates
  • The exact set of parameters for which the discrepancy is observed

Best regards,

Panagiotis

Hi, Thanks your response, I will try a third evening to figure this issue out, starting from scratch on a different cBot, and report back.


@davidrob

davidrob
10 Oct 2024, 03:56 ( Updated at: 10 Oct 2024, 06:52 )

RE: Backtester/Optimiser not matching with same parameters

PanagiotisCharalampous said: 

Hi there,

Make sure that the backtesting settings are the same. 99% of the times it happened this to me it was caused by some oversight in my backtesing settings. If there is still a problem, then we will need to following information in order to reproduce the problem

  • cBot code
  • Optimization parameters file, symbol, timeframe and dates
  • The exact set of parameters for which the discrepancy is observed

Best regards,

Panagiotis

Hi, Thanks your response, I will try a third evening to figure this issue out, starting from scratch on a different cBot, and report back.


@davidrob

davidrob
10 Oct 2024, 10:27

RE: RE: Backtester/Optimiser not matching with same parameters

davidrob said: 

PanagiotisCharalampous said: 

Hi there,

Make sure that the backtesting settings are the same. 99% of the times it happened this to me it was caused by some oversight in my backtesing settings. If there is still a problem, then we will need to following information in order to reproduce the problem

  • cBot code
  • Optimization parameters file, symbol, timeframe and dates
  • The exact set of parameters for which the discrepancy is observed

Best regards,

Panagiotis

Hi, Thanks your response, I will try a third evening to figure this issue out, starting from scratch on a different cBot, and report back.

Ok, another couple of hours and I managed to reproduce the issue. I am sure it is a bug (I am a programmer myself). Two solid pages of notes in fine print… I will try to best explain it, maybe you can reproduce it. I am old to debugging, but new to forums, so please advise if I should do something differently. 

1.


@davidrob

davidrob
10 Oct 2024, 10:27

RE: RE: Backtester/Optimiser not matching with same parameters

davidrob said: 

PanagiotisCharalampous said: 

Hi there,

Make sure that the backtesting settings are the same. 99% of the times it happened this to me it was caused by some oversight in my backtesing settings. If there is still a problem, then we will need to following information in order to reproduce the problem

  • cBot code
  • Optimization parameters file, symbol, timeframe and dates
  • The exact set of parameters for which the discrepancy is observed

Best regards,

Panagiotis

Hi, Thanks your response, I will try a third evening to figure this issue out, starting from scratch on a different cBot, and report back.

Ok, another couple of hours and I managed to reproduce the issue. I am sure it is a bug (I am a programmer myself). Two solid pages of notes in fine print… I will try to best explain it, maybe you can reproduce it. I am old to debugging, but new to forums, so please advise if I should do something differently. 

1.


@davidrob

PanagiotisCharalampous
10 Oct 2024, 10:41

RE: RE: RE: Backtester/Optimiser not matching with same parameters

davidrob said: 

davidrob said: 

PanagiotisCharalampous said: 

Hi there,

Make sure that the backtesting settings are the same. 99% of the times it happened this to me it was caused by some oversight in my backtesing settings. If there is still a problem, then we will need to following information in order to reproduce the problem

  • cBot code
  • Optimization parameters file, symbol, timeframe and dates
  • The exact set of parameters for which the discrepancy is observed

Best regards,

Panagiotis

Hi, Thanks your response, I will try a third evening to figure this issue out, starting from scratch on a different cBot, and report back.

Ok, another couple of hours and I managed to reproduce the issue. I am sure it is a bug (I am a programmer myself). Two solid pages of notes in fine print… I will try to best explain it, maybe you can reproduce it. I am old to debugging, but new to forums, so please advise if I should do something differently. 

1.

Hi there,

There is no information in your message.

Best regards,

Panagiotis


@PanagiotisCharalampous

davidrob
10 Oct 2024, 11:36 ( Updated at: 10 Oct 2024, 11:41 )

RE: RE: RE: Backtester/Optimiser not matching with same parameters

davidrob said: 

davidrob said: 

PanagiotisCharalampous said: 

Hi there,

Make sure that the backtesting settings are the same. 99% of the times it happened this to me it was caused by some oversight in my backtesing settings. If there is still a problem, then we will need to following information in order to reproduce the problem

  • cBot code
  • Optimization parameters file, symbol, timeframe and dates
  • The exact set of parameters for which the discrepancy is observed

Best regards,

Panagiotis

Hi, Thanks your response, I will try a third evening to figure this issue out, starting from scratch on a different cBot, and report back.

Sorry somehow I stuffed up the forum formatting… Arghhh… Ok, another couple of hours and I managed to reproduce the issue. I am sure it is a bug (I am a programmer myself). Two solid pages of notes in fine print… I will try to best explain it, maybe you can reproduce it. I am old to debugging, but new to forums, so please advise if I should do something differently. I am running BlackBull v 5.0.38.32105. (JUMP to the conclusion at the bottom if the whole process (most likely) bores you.

All tests were on the EURUSD.

  1.    I tried a new bot, RSI Sample, and carefully made my tests. All worked perfectly.
  2.    I went back to my original bot, "Macd & Rsi Strategy", deleted it and reinstalled.  Changed no parms.
  3.    Set the BackTest (BT) date parms… 01/09/2024 - 09/10/2024.
  4.    Ran BT, checked to make sure no open positions. Profit(P) = 201.36
  5.    Setup Optimisation (OPT) set dates again, unticked ALL parms, set TimeFrame(TF) to h1;h4, 
  6.    Ran OPT, Ph1=201.36, Ph4=-204.52.
  7.    Set OPT parms again, to m30;m45;h1. Checked my dates again, and ran. Chose the m45 OPT line (P=-894.90) clicked APPLY.
  8.    Noted correct change in left panel instance. 
  9.    Ran BT :  Pm45=-786.98.  Aha…. DIFFERENT. 
  10.   Compared the BT/OPT trade lists, and the number of trades varied, one was 17, one was 18 (both no open pos's), and the last two trades opentimes, etc were all different. Nearl;y all the parms did not match. It's like that run used a different time window, or different source parms.  I also noted several of the openTimes in the OPT list were all set to 00:00:00.
  11.  From the OPT lines, I APPLIED and BT'd the h1 timeframe… same as always…. 201.36.
  12.   I tried OPT on several values.. m30;m45;h1;h2;h3;h4.  The m45 reported the correct matching BT value: Pm45=-786.98. Selected it - APPLY - BT - P=-786.98. Perfect.
  13.  I thought WTF?  This is a prick of a bug.  Must be the combination of values… M30;m45;h1. OPT'd them and all was perfect.
  14.  So I went back to the beginning, deleted the bot, closed CTrader, reopened it, reinstalled.
  15.   Setup the same tests… BT- set dates.  (I noticed the remembered FROM date was 09/09/2024, not 01/09/2024. The remembered end date was correct at 09/10/2024.
  16.   Reset the BT start date, ran the BT - Ph1=201.36 same so far.
  17.  OPT - Noted same date issue, fixed that, set OPT values to h1;h4, and ran.  Ph1 = 201.36, Ph4= -204.52. matches for all my tests.
  18.  OPT - set TF values to m30;m45,h1.  Ran again, m30 and h1 P values same as along. m45 value was the bum value… -894.90.
  19.  Subsequent OPT's and the bum value remains.
  20.  I'm tired but I just had a thought…. Set the left panel timeframe to h1 and run an OPT with the TF parms set to m30;m45,h1. 
  21.   Now, Set the left panel timeframe to m45 and run the same OPT… and you get the correct value! 
  22.   One more test… set the left panel timeframe to m45, run, set it to m20  and run again… the same OPT…  all P values are correct.
  23. Set the left panel to h1, OPT again, and the Pm45 value of -894.90 is wrong. 
  24. CONCLUSION: the bug has to do with the OPT TimeFrame combo of m30;m45,h1, and the left panel setting of h1.
  25. Hope that helps!

 


@davidrob

PanagiotisCharalampous
10 Oct 2024, 12:51

RE: RE: RE: RE: Backtester/Optimiser not matching with same parameters

davidrob said: 

davidrob said: 

davidrob said: 

PanagiotisCharalampous said: 

Hi there,

Make sure that the backtesting settings are the same. 99% of the times it happened this to me it was caused by some oversight in my backtesing settings. If there is still a problem, then we will need to following information in order to reproduce the problem

  • cBot code
  • Optimization parameters file, symbol, timeframe and dates
  • The exact set of parameters for which the discrepancy is observed

Best regards,

Panagiotis

Hi, Thanks your response, I will try a third evening to figure this issue out, starting from scratch on a different cBot, and report back.

Sorry somehow I stuffed up the forum formatting… Arghhh… Ok, another couple of hours and I managed to reproduce the issue. I am sure it is a bug (I am a programmer myself). Two solid pages of notes in fine print… I will try to best explain it, maybe you can reproduce it. I am old to debugging, but new to forums, so please advise if I should do something differently. I am running BlackBull v 5.0.38.32105. (JUMP to the conclusion at the bottom if the whole process (most likely) bores you.

All tests were on the EURUSD.

  1.    I tried a new bot, RSI Sample, and carefully made my tests. All worked perfectly.
  2.    I went back to my original bot, "Macd & Rsi Strategy", deleted it and reinstalled.  Changed no parms.
  3.    Set the BackTest (BT) date parms… 01/09/2024 - 09/10/2024.
  4.    Ran BT, checked to make sure no open positions. Profit(P) = 201.36
  5.    Setup Optimisation (OPT) set dates again, unticked ALL parms, set TimeFrame(TF) to h1;h4, 
  6.    Ran OPT, Ph1=201.36, Ph4=-204.52.
  7.    Set OPT parms again, to m30;m45;h1. Checked my dates again, and ran. Chose the m45 OPT line (P=-894.90) clicked APPLY.
  8.    Noted correct change in left panel instance. 
  9.    Ran BT :  Pm45=-786.98.  Aha…. DIFFERENT. 
  10.   Compared the BT/OPT trade lists, and the number of trades varied, one was 17, one was 18 (both no open pos's), and the last two trades opentimes, etc were all different. Nearl;y all the parms did not match. It's like that run used a different time window, or different source parms.  I also noted several of the openTimes in the OPT list were all set to 00:00:00.
  11.  From the OPT lines, I APPLIED and BT'd the h1 timeframe… same as always…. 201.36.
  12.   I tried OPT on several values.. m30;m45;h1;h2;h3;h4.  The m45 reported the correct matching BT value: Pm45=-786.98. Selected it - APPLY - BT - P=-786.98. Perfect.
  13.  I thought WTF?  This is a prick of a bug.  Must be the combination of values… M30;m45;h1. OPT'd them and all was perfect.
  14.  So I went back to the beginning, deleted the bot, closed CTrader, reopened it, reinstalled.
  15.   Setup the same tests… BT- set dates.  (I noticed the remembered FROM date was 09/09/2024, not 01/09/2024. The remembered end date was correct at 09/10/2024.
  16.   Reset the BT start date, ran the BT - Ph1=201.36 same so far.
  17.  OPT - Noted same date issue, fixed that, set OPT values to h1;h4, and ran.  Ph1 = 201.36, Ph4= -204.52. matches for all my tests.
  18.  OPT - set TF values to m30;m45,h1.  Ran again, m30 and h1 P values same as along. m45 value was the bum value… -894.90.
  19.  Subsequent OPT's and the bum value remains.
  20.  I'm tired but I just had a thought…. Set the left panel timeframe to h1 and run an OPT with the TF parms set to m30;m45,h1. 
  21.   Now, Set the left panel timeframe to m45 and run the same OPT… and you get the correct value! 
  22.   One more test… set the left panel timeframe to m45, run, set it to m20  and run again… the same OPT…  all P values are correct.
  23. Set the left panel to h1, OPT again, and the Pm45 value of -894.90 is wrong. 
  24. CONCLUSION: the bug has to do with the OPT TimeFrame combo of m30;m45,h1, and the left panel setting of h1.
  25. Hope that helps!

 

Hi,

I still need the information I asked for to reproduce the problem.

Best regards,

Panagiotis


@PanagiotisCharalampous

davidrob
10 Oct 2024, 22:36

RE: RE: RE: RE: RE: Backtester/Optimiser not matching with same parameters

PanagiotisCharalampous said: 

davidrob said: 

davidrob said: 

davidrob said: 

PanagiotisCharalampous said: 

Hi there,

Make sure that the backtesting settings are the same. 99% of the times it happened this to me it was caused by some oversight in my backtesing settings. If there is still a problem, then we will need to following information in order to reproduce the problem

  • cBot code
  • Optimization parameters file, symbol, timeframe and dates
  • The exact set of parameters for which the discrepancy is observed

Best regards,

Panagiotis

Hi, Thanks your response, I will try a third evening to figure this issue out, starting from scratch on a different cBot, and report back.

Sorry somehow I stuffed up the forum formatting… Arghhh… Ok, another couple of hours and I managed to reproduce the issue. I am sure it is a bug (I am a programmer myself). Two solid pages of notes in fine print… I will try to best explain it, maybe you can reproduce it. I am old to debugging, but new to forums, so please advise if I should do something differently. I am running BlackBull v 5.0.38.32105. (JUMP to the conclusion at the bottom if the whole process (most likely) bores you.

All tests were on the EURUSD.

  1.    I tried a new bot, RSI Sample, and carefully made my tests. All worked perfectly.
  2.    I went back to my original bot, "Macd & Rsi Strategy", deleted it and reinstalled.  Changed no parms.
  3.    Set the BackTest (BT) date parms… 01/09/2024 - 09/10/2024.
  4.    Ran BT, checked to make sure no open positions. Profit(P) = 201.36
  5.    Setup Optimisation (OPT) set dates again, unticked ALL parms, set TimeFrame(TF) to h1;h4, 
  6.    Ran OPT, Ph1=201.36, Ph4=-204.52.
  7.    Set OPT parms again, to m30;m45;h1. Checked my dates again, and ran. Chose the m45 OPT line (P=-894.90) clicked APPLY.
  8.    Noted correct change in left panel instance. 
  9.    Ran BT :  Pm45=-786.98.  Aha…. DIFFERENT. 
  10.   Compared the BT/OPT trade lists, and the number of trades varied, one was 17, one was 18 (both no open pos's), and the last two trades opentimes, etc were all different. Nearl;y all the parms did not match. It's like that run used a different time window, or different source parms.  I also noted several of the openTimes in the OPT list were all set to 00:00:00.
  11.  From the OPT lines, I APPLIED and BT'd the h1 timeframe… same as always…. 201.36.
  12.   I tried OPT on several values.. m30;m45;h1;h2;h3;h4.  The m45 reported the correct matching BT value: Pm45=-786.98. Selected it - APPLY - BT - P=-786.98. Perfect.
  13.  I thought WTF?  This is a prick of a bug.  Must be the combination of values… M30;m45;h1. OPT'd them and all was perfect.
  14.  So I went back to the beginning, deleted the bot, closed CTrader, reopened it, reinstalled.
  15.   Setup the same tests… BT- set dates.  (I noticed the remembered FROM date was 09/09/2024, not 01/09/2024. The remembered end date was correct at 09/10/2024.
  16.   Reset the BT start date, ran the BT - Ph1=201.36 same so far.
  17.  OPT - Noted same date issue, fixed that, set OPT values to h1;h4, and ran.  Ph1 = 201.36, Ph4= -204.52. matches for all my tests.
  18.  OPT - set TF values to m30;m45,h1.  Ran again, m30 and h1 P values same as along. m45 value was the bum value… -894.90.
  19.  Subsequent OPT's and the bum value remains.
  20.  I'm tired but I just had a thought…. Set the left panel timeframe to h1 and run an OPT with the TF parms set to m30;m45,h1. 
  21.   Now, Set the left panel timeframe to m45 and run the same OPT… and you get the correct value! 
  22.   One more test… set the left panel timeframe to m45, run, set it to m20  and run again… the same OPT…  all P values are correct.
  23. Set the left panel to h1, OPT again, and the Pm45 value of -894.90 is wrong. 
  24. CONCLUSION: the bug has to do with the OPT TimeFrame combo of m30;m45,h1, and the left panel setting of h1.
  25. Hope that helps!

 

Hi,

I still need the information I asked for to reproduce the problem.

Best regards,

Panagiotis

Info attached - gees I was hoping I could attach a file containing all the info, but find that option not available above. Can I email it somehow?

 

 


@davidrob

davidrob
10 Oct 2024, 22:36

RE: RE: RE: RE: RE: Backtester/Optimiser not matching with same parameters

PanagiotisCharalampous said: 

davidrob said: 

davidrob said: 

davidrob said: 

PanagiotisCharalampous said: 

Hi there,

Make sure that the backtesting settings are the same. 99% of the times it happened this to me it was caused by some oversight in my backtesing settings. If there is still a problem, then we will need to following information in order to reproduce the problem

  • cBot code
  • Optimization parameters file, symbol, timeframe and dates
  • The exact set of parameters for which the discrepancy is observed

Best regards,

Panagiotis

Hi, Thanks your response, I will try a third evening to figure this issue out, starting from scratch on a different cBot, and report back.

Sorry somehow I stuffed up the forum formatting… Arghhh… Ok, another couple of hours and I managed to reproduce the issue. I am sure it is a bug (I am a programmer myself). Two solid pages of notes in fine print… I will try to best explain it, maybe you can reproduce it. I am old to debugging, but new to forums, so please advise if I should do something differently. I am running BlackBull v 5.0.38.32105. (JUMP to the conclusion at the bottom if the whole process (most likely) bores you.

All tests were on the EURUSD.

  1.    I tried a new bot, RSI Sample, and carefully made my tests. All worked perfectly.
  2.    I went back to my original bot, "Macd & Rsi Strategy", deleted it and reinstalled.  Changed no parms.
  3.    Set the BackTest (BT) date parms… 01/09/2024 - 09/10/2024.
  4.    Ran BT, checked to make sure no open positions. Profit(P) = 201.36
  5.    Setup Optimisation (OPT) set dates again, unticked ALL parms, set TimeFrame(TF) to h1;h4, 
  6.    Ran OPT, Ph1=201.36, Ph4=-204.52.
  7.    Set OPT parms again, to m30;m45;h1. Checked my dates again, and ran. Chose the m45 OPT line (P=-894.90) clicked APPLY.
  8.    Noted correct change in left panel instance. 
  9.    Ran BT :  Pm45=-786.98.  Aha…. DIFFERENT. 
  10.   Compared the BT/OPT trade lists, and the number of trades varied, one was 17, one was 18 (both no open pos's), and the last two trades opentimes, etc were all different. Nearl;y all the parms did not match. It's like that run used a different time window, or different source parms.  I also noted several of the openTimes in the OPT list were all set to 00:00:00.
  11.  From the OPT lines, I APPLIED and BT'd the h1 timeframe… same as always…. 201.36.
  12.   I tried OPT on several values.. m30;m45;h1;h2;h3;h4.  The m45 reported the correct matching BT value: Pm45=-786.98. Selected it - APPLY - BT - P=-786.98. Perfect.
  13.  I thought WTF?  This is a prick of a bug.  Must be the combination of values… M30;m45;h1. OPT'd them and all was perfect.
  14.  So I went back to the beginning, deleted the bot, closed CTrader, reopened it, reinstalled.
  15.   Setup the same tests… BT- set dates.  (I noticed the remembered FROM date was 09/09/2024, not 01/09/2024. The remembered end date was correct at 09/10/2024.
  16.   Reset the BT start date, ran the BT - Ph1=201.36 same so far.
  17.  OPT - Noted same date issue, fixed that, set OPT values to h1;h4, and ran.  Ph1 = 201.36, Ph4= -204.52. matches for all my tests.
  18.  OPT - set TF values to m30;m45,h1.  Ran again, m30 and h1 P values same as along. m45 value was the bum value… -894.90.
  19.  Subsequent OPT's and the bum value remains.
  20.  I'm tired but I just had a thought…. Set the left panel timeframe to h1 and run an OPT with the TF parms set to m30;m45,h1. 
  21.   Now, Set the left panel timeframe to m45 and run the same OPT… and you get the correct value! 
  22.   One more test… set the left panel timeframe to m45, run, set it to m20  and run again… the same OPT…  all P values are correct.
  23. Set the left panel to h1, OPT again, and the Pm45 value of -894.90 is wrong. 
  24. CONCLUSION: the bug has to do with the OPT TimeFrame combo of m30;m45,h1, and the left panel setting of h1.
  25. Hope that helps!

 

Hi,

I still need the information I asked for to reproduce the problem.

Best regards,

Panagiotis

Info attached - gees I was hoping I could attach a file containing all the info, but find that option not available above. Can I email it somehow?

 

 


@davidrob

PanagiotisCharalampous
11 Oct 2024, 05:18

RE: RE: RE: RE: RE: RE: Backtester/Optimiser not matching with same parameters

davidrob said: 

PanagiotisCharalampous said: 

davidrob said: 

davidrob said: 

davidrob said: 

PanagiotisCharalampous said: 

Hi there,

Make sure that the backtesting settings are the same. 99% of the times it happened this to me it was caused by some oversight in my backtesing settings. If there is still a problem, then we will need to following information in order to reproduce the problem

  • cBot code
  • Optimization parameters file, symbol, timeframe and dates
  • The exact set of parameters for which the discrepancy is observed

Best regards,

Panagiotis

Hi, Thanks your response, I will try a third evening to figure this issue out, starting from scratch on a different cBot, and report back.

Sorry somehow I stuffed up the forum formatting… Arghhh… Ok, another couple of hours and I managed to reproduce the issue. I am sure it is a bug (I am a programmer myself). Two solid pages of notes in fine print… I will try to best explain it, maybe you can reproduce it. I am old to debugging, but new to forums, so please advise if I should do something differently. I am running BlackBull v 5.0.38.32105. (JUMP to the conclusion at the bottom if the whole process (most likely) bores you.

All tests were on the EURUSD.

  1.    I tried a new bot, RSI Sample, and carefully made my tests. All worked perfectly.
  2.    I went back to my original bot, "Macd & Rsi Strategy", deleted it and reinstalled.  Changed no parms.
  3.    Set the BackTest (BT) date parms… 01/09/2024 - 09/10/2024.
  4.    Ran BT, checked to make sure no open positions. Profit(P) = 201.36
  5.    Setup Optimisation (OPT) set dates again, unticked ALL parms, set TimeFrame(TF) to h1;h4, 
  6.    Ran OPT, Ph1=201.36, Ph4=-204.52.
  7.    Set OPT parms again, to m30;m45;h1. Checked my dates again, and ran. Chose the m45 OPT line (P=-894.90) clicked APPLY.
  8.    Noted correct change in left panel instance. 
  9.    Ran BT :  Pm45=-786.98.  Aha…. DIFFERENT. 
  10.   Compared the BT/OPT trade lists, and the number of trades varied, one was 17, one was 18 (both no open pos's), and the last two trades opentimes, etc were all different. Nearl;y all the parms did not match. It's like that run used a different time window, or different source parms.  I also noted several of the openTimes in the OPT list were all set to 00:00:00.
  11.  From the OPT lines, I APPLIED and BT'd the h1 timeframe… same as always…. 201.36.
  12.   I tried OPT on several values.. m30;m45;h1;h2;h3;h4.  The m45 reported the correct matching BT value: Pm45=-786.98. Selected it - APPLY - BT - P=-786.98. Perfect.
  13.  I thought WTF?  This is a prick of a bug.  Must be the combination of values… M30;m45;h1. OPT'd them and all was perfect.
  14.  So I went back to the beginning, deleted the bot, closed CTrader, reopened it, reinstalled.
  15.   Setup the same tests… BT- set dates.  (I noticed the remembered FROM date was 09/09/2024, not 01/09/2024. The remembered end date was correct at 09/10/2024.
  16.   Reset the BT start date, ran the BT - Ph1=201.36 same so far.
  17.  OPT - Noted same date issue, fixed that, set OPT values to h1;h4, and ran.  Ph1 = 201.36, Ph4= -204.52. matches for all my tests.
  18.  OPT - set TF values to m30;m45,h1.  Ran again, m30 and h1 P values same as along. m45 value was the bum value… -894.90.
  19.  Subsequent OPT's and the bum value remains.
  20.  I'm tired but I just had a thought…. Set the left panel timeframe to h1 and run an OPT with the TF parms set to m30;m45,h1. 
  21.   Now, Set the left panel timeframe to m45 and run the same OPT… and you get the correct value! 
  22.   One more test… set the left panel timeframe to m45, run, set it to m20  and run again… the same OPT…  all P values are correct.
  23. Set the left panel to h1, OPT again, and the Pm45 value of -894.90 is wrong. 
  24. CONCLUSION: the bug has to do with the OPT TimeFrame combo of m30;m45,h1, and the left panel setting of h1.
  25. Hope that helps!

 

Hi,

I still need the information I asked for to reproduce the problem.

Best regards,

Panagiotis

Info attached - gees I was hoping I could attach a file containing all the info, but find that option not available above. Can I email it somehow?

 

 

You can send it to community@ctrader.com


@PanagiotisCharalampous

davidrob
17 Oct 2024, 21:45

RE: RE: RE: RE: RE: RE: RE: Backtester/Optimiser not matching with same parameters
PanagiotisCharalampous said:

davidrob said: 

PanagiotisCharalampous said: 

davidrob said: 

davidrob said: 

davidrob said: 

PanagiotisCharalampous said: 

Hi there,

Make sure that the backtesting settings are the same. 99% of the times it happened this to me it was caused by some oversight in my backtesing settings. If there is still a problem, then we will need to following information in order to reproduce the problem

  • cBot code
  • Optimization parameters file, symbol, timeframe and dates
  • The exact set of parameters for which the discrepancy is observed

Best regards,

Panagiotis

Hi, Thanks your response, I will try a third evening to figure this issue out, starting from scratch on a different cBot, and report back.

Sorry somehow I stuffed up the forum formatting… Arghhh… Ok, another couple of hours and I managed to reproduce the issue. I am sure it is a bug (I am a programmer myself). Two solid pages of notes in fine print… I will try to best explain it, maybe you can reproduce it. I am old to debugging, but new to forums, so please advise if I should do something differently. I am running BlackBull v 5.0.38.32105. (JUMP to the conclusion at the bottom if the whole process (most likely) bores you.

All tests were on the EURUSD.

  1.    I tried a new bot, RSI Sample, and carefully made my tests. All worked perfectly.
  2.    I went back to my original bot, "Macd & Rsi Strategy", deleted it and reinstalled.  Changed no parms.
  3.    Set the BackTest (BT) date parms… 01/09/2024 - 09/10/2024.
  4.    Ran BT, checked to make sure no open positions. Profit(P) = 201.36
  5.    Setup Optimisation (OPT) set dates again, unticked ALL parms, set TimeFrame(TF) to h1;h4, 
  6.    Ran OPT, Ph1=201.36, Ph4=-204.52.
  7.    Set OPT parms again, to m30;m45;h1. Checked my dates again, and ran. Chose the m45 OPT line (P=-894.90) clicked APPLY.
  8.    Noted correct change in left panel instance. 
  9.    Ran BT :  Pm45=-786.98.  Aha…. DIFFERENT. 
  10.   Compared the BT/OPT trade lists, and the number of trades varied, one was 17, one was 18 (both no open pos's), and the last two trades opentimes, etc were all different. Nearl;y all the parms did not match. It's like that run used a different time window, or different source parms.  I also noted several of the openTimes in the OPT list were all set to 00:00:00.
  11.  From the OPT lines, I APPLIED and BT'd the h1 timeframe… same as always…. 201.36.
  12.   I tried OPT on several values.. m30;m45;h1;h2;h3;h4.  The m45 reported the correct matching BT value: Pm45=-786.98. Selected it - APPLY - BT - P=-786.98. Perfect.
  13.  I thought WTF?  This is a prick of a bug.  Must be the combination of values… M30;m45;h1. OPT'd them and all was perfect.
  14.  So I went back to the beginning, deleted the bot, closed CTrader, reopened it, reinstalled.
  15.   Setup the same tests… BT- set dates.  (I noticed the remembered FROM date was 09/09/2024, not 01/09/2024. The remembered end date was correct at 09/10/2024.
  16.   Reset the BT start date, ran the BT - Ph1=201.36 same so far.
  17.  OPT - Noted same date issue, fixed that, set OPT values to h1;h4, and ran.  Ph1 = 201.36, Ph4= -204.52. matches for all my tests.
  18.  OPT - set TF values to m30;m45,h1.  Ran again, m30 and h1 P values same as along. m45 value was the bum value… -894.90.
  19.  Subsequent OPT's and the bum value remains.
  20.  I'm tired but I just had a thought…. Set the left panel timeframe to h1 and run an OPT with the TF parms set to m30;m45,h1. 
  21.   Now, Set the left panel timeframe to m45 and run the same OPT… and you get the correct value! 
  22.   One more test… set the left panel timeframe to m45, run, set it to m20  and run again… the same OPT…  all P values are correct.
  23. Set the left panel to h1, OPT again, and the Pm45 value of -894.90 is wrong. 
  24. CONCLUSION: the bug has to do with the OPT TimeFrame combo of m30;m45,h1, and the left panel setting of h1.
  25. Hope that helps!

 

Hi,

I still need the information I asked for to reproduce the problem.

Best regards,

Panagiotis

Info attached - gees I was hoping I could attach a file containing all the info, but find that option not available above. Can I email it somehow?

 

 

You can send it to community@ctrader.com


@davidrob

davidrob
17 Oct 2024, 21:46

RE: RE: RE: RE: RE: RE: RE: Backtester/Optimiser not matching with same parameters
PanagiotisCharalampous said:

davidrob said: 

PanagiotisCharalampous said: 

davidrob said: 

davidrob said: 

davidrob said: 

PanagiotisCharalampous said: 

Hi there,

Make sure that the backtesting settings are the same. 99% of the times it happened this to me it was caused by some oversight in my backtesing settings. If there is still a problem, then we will need to following information in order to reproduce the problem

  • cBot code
  • Optimization parameters file, symbol, timeframe and dates
  • The exact set of parameters for which the discrepancy is observed

Best regards,

Panagiotis

Hi, Thanks your response, I will try a third evening to figure this issue out, starting from scratch on a different cBot, and report back.

Sorry somehow I stuffed up the forum formatting… Arghhh… Ok, another couple of hours and I managed to reproduce the issue. I am sure it is a bug (I am a programmer myself). Two solid pages of notes in fine print… I will try to best explain it, maybe you can reproduce it. I am old to debugging, but new to forums, so please advise if I should do something differently. I am running BlackBull v 5.0.38.32105. (JUMP to the conclusion at the bottom if the whole process (most likely) bores you.

All tests were on the EURUSD.

  1.    I tried a new bot, RSI Sample, and carefully made my tests. All worked perfectly.
  2.    I went back to my original bot, "Macd & Rsi Strategy", deleted it and reinstalled.  Changed no parms.
  3.    Set the BackTest (BT) date parms… 01/09/2024 - 09/10/2024.
  4.    Ran BT, checked to make sure no open positions. Profit(P) = 201.36
  5.    Setup Optimisation (OPT) set dates again, unticked ALL parms, set TimeFrame(TF) to h1;h4, 
  6.    Ran OPT, Ph1=201.36, Ph4=-204.52.
  7.    Set OPT parms again, to m30;m45;h1. Checked my dates again, and ran. Chose the m45 OPT line (P=-894.90) clicked APPLY.
  8.    Noted correct change in left panel instance. 
  9.    Ran BT :  Pm45=-786.98.  Aha…. DIFFERENT. 
  10.   Compared the BT/OPT trade lists, and the number of trades varied, one was 17, one was 18 (both no open pos's), and the last two trades opentimes, etc were all different. Nearl;y all the parms did not match. It's like that run used a different time window, or different source parms.  I also noted several of the openTimes in the OPT list were all set to 00:00:00.
  11.  From the OPT lines, I APPLIED and BT'd the h1 timeframe… same as always…. 201.36.
  12.   I tried OPT on several values.. m30;m45;h1;h2;h3;h4.  The m45 reported the correct matching BT value: Pm45=-786.98. Selected it - APPLY - BT - P=-786.98. Perfect.
  13.  I thought WTF?  This is a prick of a bug.  Must be the combination of values… M30;m45;h1. OPT'd them and all was perfect.
  14.  So I went back to the beginning, deleted the bot, closed CTrader, reopened it, reinstalled.
  15.   Setup the same tests… BT- set dates.  (I noticed the remembered FROM date was 09/09/2024, not 01/09/2024. The remembered end date was correct at 09/10/2024.
  16.   Reset the BT start date, ran the BT - Ph1=201.36 same so far.
  17.  OPT - Noted same date issue, fixed that, set OPT values to h1;h4, and ran.  Ph1 = 201.36, Ph4= -204.52. matches for all my tests.
  18.  OPT - set TF values to m30;m45,h1.  Ran again, m30 and h1 P values same as along. m45 value was the bum value… -894.90.
  19.  Subsequent OPT's and the bum value remains.
  20.  I'm tired but I just had a thought…. Set the left panel timeframe to h1 and run an OPT with the TF parms set to m30;m45,h1. 
  21.   Now, Set the left panel timeframe to m45 and run the same OPT… and you get the correct value! 
  22.   One more test… set the left panel timeframe to m45, run, set it to m20  and run again… the same OPT…  all P values are correct.
  23. Set the left panel to h1, OPT again, and the Pm45 value of -894.90 is wrong. 
  24. CONCLUSION: the bug has to do with the OPT TimeFrame combo of m30;m45,h1, and the left panel setting of h1.
  25. Hope that helps!

 

Hi,

I still need the information I asked for to reproduce the problem.

Best regards,

Panagiotis

Info attached - gees I was hoping I could attach a file containing all the info, but find that option not available above. Can I email it somehow?

 

 

You can send it to community@ctrader.com


@davidrob

davidrob
17 Oct 2024, 21:48

RE: RE: RE: RE: RE: RE: RE: RE: Backtester/Optimiser not matching with same parameters

davidrob said: 

PanagiotisCharalampous said: 

davidrob said: 

PanagiotisCharalampous said: 

davidrob said: 

davidrob said: 

davidrob said: 

PanagiotisCharalampous said: 

Hi there,

Make sure that the backtesting settings are the same. 99% of the times it happened this to me it was caused by some oversight in my backtesing settings. If there is still a problem, then we will need to following information in order to reproduce the problem

  • cBot code
  • Optimization parameters file, symbol, timeframe and dates
  • The exact set of parameters for which the discrepancy is observed

Best regards,

Panagiotis

Hi, Thanks your response, I will try a third evening to figure this issue out, starting from scratch on a different cBot, and report back.

Sorry somehow I stuffed up the forum formatting… Arghhh… Ok, another couple of hours and I managed to reproduce the issue. I am sure it is a bug (I am a programmer myself). Two solid pages of notes in fine print… I will try to best explain it, maybe you can reproduce it. I am old to debugging, but new to forums, so please advise if I should do something differently. I am running BlackBull v 5.0.38.32105. (JUMP to the conclusion at the bottom if the whole process (most likely) bores you.

All tests were on the EURUSD.

  1.    I tried a new bot, RSI Sample, and carefully made my tests. All worked perfectly.
  2.    I went back to my original bot, "Macd & Rsi Strategy", deleted it and reinstalled.  Changed no parms.
  3.    Set the BackTest (BT) date parms… 01/09/2024 - 09/10/2024.
  4.    Ran BT, checked to make sure no open positions. Profit(P) = 201.36
  5.    Setup Optimisation (OPT) set dates again, unticked ALL parms, set TimeFrame(TF) to h1;h4, 
  6.    Ran OPT, Ph1=201.36, Ph4=-204.52.
  7.    Set OPT parms again, to m30;m45;h1. Checked my dates again, and ran. Chose the m45 OPT line (P=-894.90) clicked APPLY.
  8.    Noted correct change in left panel instance. 
  9.    Ran BT :  Pm45=-786.98.  Aha…. DIFFERENT. 
  10.   Compared the BT/OPT trade lists, and the number of trades varied, one was 17, one was 18 (both no open pos's), and the last two trades opentimes, etc were all different. Nearl;y all the parms did not match. It's like that run used a different time window, or different source parms.  I also noted several of the openTimes in the OPT list were all set to 00:00:00.
  11.  From the OPT lines, I APPLIED and BT'd the h1 timeframe… same as always…. 201.36.
  12.   I tried OPT on several values.. m30;m45;h1;h2;h3;h4.  The m45 reported the correct matching BT value: Pm45=-786.98. Selected it - APPLY - BT - P=-786.98. Perfect.
  13.  I thought WTF?  This is a prick of a bug.  Must be the combination of values… M30;m45;h1. OPT'd them and all was perfect.
  14.  So I went back to the beginning, deleted the bot, closed CTrader, reopened it, reinstalled.
  15.   Setup the same tests… BT- set dates.  (I noticed the remembered FROM date was 09/09/2024, not 01/09/2024. The remembered end date was correct at 09/10/2024.
  16.   Reset the BT start date, ran the BT - Ph1=201.36 same so far.
  17.  OPT - Noted same date issue, fixed that, set OPT values to h1;h4, and ran.  Ph1 = 201.36, Ph4= -204.52. matches for all my tests.
  18.  OPT - set TF values to m30;m45,h1.  Ran again, m30 and h1 P values same as along. m45 value was the bum value… -894.90.
  19.  Subsequent OPT's and the bum value remains.
  20.  I'm tired but I just had a thought…. Set the left panel timeframe to h1 and run an OPT with the TF parms set to m30;m45,h1. 
  21.   Now, Set the left panel timeframe to m45 and run the same OPT… and you get the correct value! 
  22.   One more test… set the left panel timeframe to m45, run, set it to m20  and run again… the same OPT…  all P values are correct.
  23. Set the left panel to h1, OPT again, and the Pm45 value of -894.90 is wrong. 
  24. CONCLUSION: the bug has to do with the OPT TimeFrame combo of m30;m45,h1, and the left panel setting of h1.
  25. Hope that helps!

 

Hi,

I still need the information I asked for to reproduce the problem.

Best regards,

Panagiotis

Info attached - gees I was hoping I could attach a file containing all the info, but find that option not available above. Can I email it somehow?

 

 

You can send it to community@ctrader.com

Hi Panagiotis, the information was sent a few days ago. I will be keen to hear the fix to the issue. Thanks.

 


@davidrob