hmmm...I don't think that we should involve a third tool that most of the people don't have installed on their computer...I will try to do it as a MQL Script or a Windows shellscript.garyfritz wrote:I'd say an external script. You could do a simple text find&replace, or it would be very simple to do it in Perl or something like that. Ideally it would be best to use something that actually parsed the code so you only changed the things you were really supposed to change -- e.g. if the EA had a string that said "The High value is:", you wouldn't want to change it to "The BT_High value is:"-- but I think a Perl parser would be good enough.
Why don't we use a Parameter "backtester" that can be set to true/false. In the library I just make a simple check with "if (backtester) { function override } else { original function }". This way we only need to rename the functions once for every EA and then use only the BT_XXX functions in the Indicator and in the EA. I think this would be a much easier and cleaner solution then renaming the functions every time we want to add or change something. Just a thought.
Yep, that sounds plausible, clean and easy to implement... me likey..garyfritz wrote:I don't think it's that hard. e.g. iClose() has a "shift" parameter. So BT_iClose() will also take a "shift" parameter, and we'll just add the current Backtest_Bar to Shift before passing it to iClose(). So if the EA wants the Close of 1 bar ago, it would pass a value of 1 to iClose(). If we're currently backtesting on bar 100, we'll just pass a value of 100+1 to iClose(). High and Time &etc would be similar, but BT_High() and BT_Time() &etc would just pass Backtest_Bar to the corresponding iHigh() or whatever function.
Yeah ...they will sure come up...especially with Empty4..garyfritz wrote:Well, we're starting already, figuring out some of these issues... and I'm sure we'll run into more!
hehe...yes you really should...I'm used to subversion but I think that I will jump on the Git train this time. Bitbucket seems to be ok...I will setup an account with them.garyfritz wrote:No, and I really should. I've got Tortoise SVN on my system but I never started using it. A shared repository like that bitbucket.org is probably a good idea for a shared project
I found also a nice client for it at http://code.google.com/p/gitextensions/ . This has also a explorer shell extension...like tortoise svn.
Aaaargh...but I thought so already... ok... the I will see how far I get..garyfritz wrote:Unfortunately my time is extremely limited -- I'm already spending too much time here and falling far behind on my paying job -- and it looks like it's about to get much worse.I might have to let you run with this, and I just act as a sounding board for design ideas.
thanks for your comments and insights...
happy trading,
NeoTrader
-