Topic: Skype Conference 2012-04-01 Chat Log
[13:00:11] Miroslav Popov: Hello everyone,
[13:00:19] Miroslav Popov: how are you today?
[13:00:45] Miroslav Popov: Who is online now?
[13:00:56] Adam Burgess: I am here.
[13:01:14] Miroslav Popov: Hello Adam! Nice to see you here
[13:01:28] Adam Burgess: Thank you, how was your tournament?
[13:01:49] Miroslav Popov: We started yesterday with kata.
[13:01:55] Miroslav Popov: Today is the sparring
[13:02:19] Miroslav Popov: I'm starting in 1 hour. Now I'm in the change room
[13:03:01] Adam Burgess: Showing some hard core dedication to FSB by being here.
[13:03:42] Miroslav Popov: I'm totally dedicated to both programming and martial arts
[13:04:37] Adam Burgess: I didn't get a chance this week to check our the exp branch that you mentioned last week. Have you done some work on the plugin interface ideas in this one?
[13:04:58] Miroslav Popov: No, I didn't
[13:05:22] Miroslav Popov: I want to publish FSB final and FST till the end of upcoming week
[13:05:53] Adam Burgess: OK .. I built a plugin interface for the existing mainline release for indicators only that appeared appears to work nicely. Once you have published the next release I will look at integrating some of this for you to take a look at.
[13:06:55] Adam Burgess: I'd like to be able to build a strategy performance report with similar functionality to what is available in some of the commercial tools that I have, but only have some of the math in proprietary DLL files so a plugin DLL would be the only way for me to do this.
[13:06:59] Miroslav Popov: The final release will not differ from the current master branch
[13:07:11] Adam Burgess: OK.
[13:07:32] Adam Burgess: Can you tell me a little more about what you are thinking around the changes to the math in future releases please?
[13:07:42] Miroslav Popov: If you know the formulas, we can integrate the analysis in FSB
[13:08:20] Miroslav Popov: I want to reformat FSB in order to make it more modular and object oriented
[13:08:40] Adam Burgess: [12:08] Miroslav Popov:
<<< If you know the formulas
Some of the formulas I only have in commercial binary format. I'm licensed to redistribute these, but only as binaries.
[13:09:00] Miroslav Popov: The bigest problem now is that the Backtester calculations and data files are static classes
[13:09:22] Miroslav Popov: Formulas cannot be patented and copyrighted
[13:09:36] Miroslav Popov: If you know the maths we can rebuild the formulas freely
[13:10:19] Adam Burgess: [12:09] Miroslav Popov:
<<< Formulas cannot be patented and copyrighted
Understood, I was more thinking of the effort involved in re-creating some of the stuff that I already have access to now. Will play around with a few ideas over the coming weeks and make some suggestions.
[13:10:23] Miroslav Popov: If we do not use code, we can reproduce the logic
[13:10:48] Miroslav Popov: OK
[13:10:53 | Edited 13:10:57] Miroslav Popov: About FSB
[13:11:14] Miroslav Popov: I separated Backtester in a class
[13:11:49] Miroslav Popov: Now different tools like Generator and Optimizer instantinate a backtester to use it
[13:12:03] Adam Burgess: My guess is that you are looking to be able to build multiple instances of the backtester to allow for multi-threaded applications?
[13:12:11] Miroslav Popov: So they calculate independantly
[13:12:21] Miroslav Popov: That's one
[13:12:36] Miroslav Popov: The other is to make more modern GUI
[13:12:47] Miroslav Popov: with tabs for different strategies and tools
[13:13:08] Miroslav Popov: Also later to integrate Trader to FSB
[13:21:49] Adam Burgess: I think integrating FST and FSB together would be a great idea, and a much lower overhead than maintaining both of these products individually.
[13:22:38] Adam Burgess: I was going to suggest that consideration be given to moving some of the duplicated logic into a class library which is available to both FSB and FST so there is only a single codebase to maintain, but it there is a way to merge the two products that would be much easier.
[13:22:58] Miroslav Popov: I want to keep the Forex Strategy Builder brand since FST is not very popular
[13:23:14] Adam Burgess: Makes sense.
[13:23:47] Miroslav Popov: But also we need a light weight VPS trader
[13:24:24] Adam Burgess: Have you thought about actually building a 'translator' of sorts into FSB that would convert the FSB logic into MQL (or other code) for execution directly in the platform?
[13:24:59] Miroslav Popov: After finishing current FSB / FST releases I'll start working on next steps
[13:25:04] Adam Burgess: There would obviously need to be external DLL's that would be called from the resulting code so the actual FSB logic doesn't need to be duplicated (only the trading logic).
[13:25:36] Miroslav Popov: Probably we can leave FST for MT4 and to make MQL5 application for executing strategies directly
[13:27:00] Miroslav Popov: I'm not familiar what are the advantages of MQL5 but read that offer some improvements
[13:27:24] Adam Burgess: My long term goal is to be able to build strategies in FSB and trade them in a couple of other platforms, but the first translation will be the hardest of course, since the underlying DLL's will need to be created.
[13:27:58] Miroslav Popov: unfortunately MT5 doesn't support .NET dlls
[13:28:43] Adam Burgess: I can build a set to C++ wrapper's for MT4/MT5/etc that will do data translation from managed to unmanaged code.
[13:29:36] Miroslav Popov: FST also needs a major refactoring but it will not take too much time
[13:30:27] Miroslav Popov: the trading logic with indicators will be small and fast if we remove all GUI, charts and journals
[13:30:40] Miroslav Popov: only maintaining status file and log file
[13:31:08 | Edited 13:31:18] Miroslav Popov: Also FST has to be able to work with multiple strategies
[13:32:41] Adam Burgess: If there was a way to translate the strategies directly into a platform, FST could possibly be removed from the equation alltogether, eg:
1. Build strategy with FSB
2. Translate strategy (in FSB) to MT4/MT5 --> result placed in clipboard.
3. Paste translated strategy into platform editor.
4. Compile in platform.
Very lightweight, and no mapping back to FST, no need to have a one-to-many mapping of strategies (if the user wants to run multiple strategies, they are just run in multiple platform windows/charts).
[13:33:10] Adam Burgess: Very much thinking out loud here ... I have not done any analysis to see how much work/time would be needed to make this happen.
[13:33:33] Miroslav Popov: The bigger problem is the indicators
[13:33:58] Miroslav Popov: they has to remain same as the one in FSB
[13:34:19] Miroslav Popov: also custom indicators has to be used
[13:34:43] Adam Burgess: Agreed ... possibly the FSB indicators are all stored in a class library that is accessed by both FSB and can be called from the platform (via a wrapper DLL) ...
[13:34:55] Miroslav Popov: so MQL strategy has to call these indicators from exeternal files or dll
[13:35:21] Adam Burgess: Custom indicators will present a challenge, as this would only work if the user compiled the custom indicators into the DLL that was called externally also.
[13:35:54] Miroslav Popov: .NET dll can find custom indis and compile them
[13:37:01] Adam Burgess: Yes ... needs more thought but I believe this to be definately tecnically possible. Depending on your longer term plans for FSB, this approach may encourage other developers to get involved to build translators for other platforms also.
[13:37:16] Miroslav Popov: What do you suggest for trading logic? It to remain on C# or to be translated to C++ dll or MQL5
[13:38:17] Adam Burgess: This message has been removed.
[13:38:21] Miroslav Popov: My idea for FST was it to be a single tool that works through a Bridges.
[13:39:03] Miroslav Popov: As the case with MT4: We have a .NET part of the bridge and dll and expert for MT4
[13:40:30] Adam Burgess: Possible something like:
a. User saves strategy file as XML file to C:\Strategies\MyStrat.xml (current format).
b. The EA has an input of StrategyName=C:\Strategies\MyStrat.xml
c. When the EA initialises, it could pass this (strategy file name) into the underlying DLL and the logic would be available as long as the DLL remains in memory - the file would only need to be loaded once.
[13:41:25] Miroslav Popov: When MT4 loads a DLL, it uses it for all experts
[13:42:22] Miroslav Popov: Such DLL has to be able to work with different data files and strategies simultaneously
[13:42:40] Miroslav Popov: That's why I started refactoring FSB and will do the same with FST
[13:43:16] Adam Burgess: OK ... Instead of saving C:\Strategies\MyStrat.xml, we create a DLL from within FSB named C:\Strategies\MyStrat.dll that is a compiled DLL file containing the strategy as a variable ...
[13:43:46] Adam Burgess: The platform could have any number of FSB created DLL's loaded, and each one would have distinct logic (so no overlap).
[13:43:49] Miroslav Popov: Interesting
[13:44:08] Miroslav Popov: A dll with the strategy, used indicators and the trading logic
[13:44:39] Miroslav Popov: in that case only FSB will need indicators
[13:45:15] Adam Burgess: Yes, and providing that the indicator file is registered in the GAC or available in a static location to the dll file, then the logic would always be available.
[13:45:53] Miroslav Popov: But what about some changes to the strategy as number of entry lots
[13:46:13] Miroslav Popov: If we allow changes, we need to provide some UI
[13:47:07] Miroslav Popov: Or after compiling from FSB, the strategy will be unchangeable (and directly sent to MT)
[13:47:24] Adam Burgess: It is possible to call the C# DLL using a direct DLL call (as if it were a C or C++ DLL) but this can only be performed by editing the underlying IL code. It may be possible to do this from within the application, but I've only ever done it the manual way before (compile, decompile, edit IL code, compile).
[13:48:05] Miroslav Popov: C# can call DLL on request
[13:48:16] Miroslav Popov: but cannot free it after
[13:48:19] Adam Burgess: [12:46] Miroslav Popov:
<<< But what about some changes to the strategy as number of entry lots
We could still allow settings to be entered in the EA, so user-modifiable settings could probably just be changed in the platform I guess.
[13:49:11] Miroslav Popov: FSB can export MyStrat.dll and MyStrat.mql
[13:49:24] Miroslav Popov: So dll can have some controls from the expert
[13:50:03] Adam Burgess: Sorry ... what I was suggesting was that instead of having a C/C++ wrapper dll that then calls a .NET dll, it may be possible to build all necessary logic (strategy, indicators, and custom indicators) into a single dll that could be called directly from MT4/MT5 (rather than needing to know the location of the indicators DLL).
[13:50:04] Miroslav Popov: MyStrat.dll to be with indicators and trade logic
[13:50:54] Miroslav Popov: FSB to export a C++ dll with the strategy logic?
[13:51:16] Miroslav Popov: I do not like that
[13:51:18] Adam Burgess: No, to have everything inside a .NET dll that is callable from MT4/MT5.
[13:51:54] Miroslav Popov: MT4/5 uses expert that calls the dll, right?
[13:51:59] Adam Burgess: I have TradeStation calling directly into .NET dll's even though TradeStation does not support .NET.
[13:53:23] Adam Burgess: [12:52] Miroslav Popov:
<<< MT4/5 uses expert that calls the dll, right?
Yes ... the EA (MyStrat.mql) calls MyStrat.dll, which would either:
a. Call FSBLogic.dll to do indicator calculations; or
b. Use internal logic if MyStrat.dll was a .NET class library modified to allow calling from a non-.NET application (which is possible).
[13:54:08] Miroslav Popov: [13:53] Adam Burgess:
<<< MyStrat.dll was a .NET class library modified to allow calling from a non-.NET application (which is possible).
[13:54:26] Miroslav Popov: If we can do it we'll solve many problems
[13:54:47] Miroslav Popov: We'll remove named pipes
[13:55:15] Adam Burgess: Yes, I believe that it would be a much simpler approach.
[13:55:54] Miroslav Popov: Much simple and faster and reliable
[13:56:03] Adam Burgess: Yes
[13:56:23] Miroslav Popov: In that case the dll can work directly with the expert
[13:56:53] Adam Burgess: I will take this on if you like, and run a few tests to see what I can come up with over the next couple of weeks if you like.
[13:56:56] Miroslav Popov: Now FST sends everything via named pipes to dll server -> expert
[13:57:46] Miroslav Popov: That will be great. If we can access FST directly from the expert
[13:58:03] Miroslav Popov: we can make some simple tests first
[13:58:10] Adam Burgess: I believe that this would be a big step forward.
[13:58:14] Miroslav Popov: collecting data and sending commands
[13:58:34] Miroslav Popov: later we can make a bridge to FSB
[13:58:44 ] Miroslav Popov: and to backtest and compare trading in real time
[14:00:03] Adam Burgess: Yes ... I will start with building a dll that is callable from MT4 (I don't have MT5 anywhere) and pass some data around and work back from there, to see what dependencies are found.
[14:00:54] Miroslav Popov: I will finish with current FSB / FST in two weeks and will go forward
[14:01:31] Miroslav Popov: I'll be free from my main work till September, so I hope to make big progress
[14:03:01] Miroslav Popov: We have to put our plans in the forum so users can vote for the priority
[14:03:39] Adam Burgess: Yes .. I will start a thread on this idea once I have some basic tests done (would like to check a few things first).
[14:04:06] Miroslav Popov: OK. Thank you Adam. See you in the forum
[14:04:16] Adam Burgess: Thanks ... be well.