Topics
Replies
vldmarton
31 Aug 2020, 10:45
RE:
Alright, I removed the static keyword from all bots and the bot were talking about works fine. I have a copy of this bot that trades on ticks and not bars and that one is still a bit off. Will check code for any mistakes from my side. Thanks for your help.
If you have time, could you please explain to me why is it possible that two bots use the same variable? I thought that a class is like a capsule - even though it has some static variables, they are only available from that specific instance of the class. If I had two robots with the same classname then I'd understand the mixup but as far as the robots are named differently, they should only be able to work with their variables inside the instance. At least that's my understanding of OOP.
@vldmarton
vldmarton
27 Aug 2020, 09:15
RE:
Sorry, my bad. Me and my brother tested this on 2 computers, EURUSD, DAX, GPBAUD, result is the same.
@vldmarton
vldmarton
27 Aug 2020, 09:05
( Updated at: 21 Dec 2023, 09:22 )
Broker - Purple Trading
Optimization: Starting capital 1000, Commision 30, data m1 bars, spread 1 pip
Date range: 01/06/2020 - 25/08/2020
Backtesting parameters:
Results in optimization: +196 EUR
Results in backtesting: -85 EUR
PS: I tried with tick data as well, same story
@vldmarton
vldmarton
31 Aug 2020, 10:57
RE:
Okay it all makes sense now. I was under the impression that optimization uses one instance only.
Thanks again.
@vldmarton