Closed janckerchen closed 7 years ago
Thanks for your support, project is still ongoing, but slow progress due to lack of funds and time. I hope to continue in the next few days, otherwise it may be delayed for few weeks. Plan for the next months is to finish EA31337-Libre as fully-working EA and implement all strategies, then long-term plan is to implement new strategies and improve existing as much as possible and add new features, and create CI tests to backtest performance of all strategies in order to cherry-pick the best for given currency symbols. There is also EA31337 Lite version, which is closed project, but it is based on these class files in this repo, so you may consider purchasing it to support open-source Libre version which is complete refactor of Lite version.
@kenorb Thanks your detailed explain very much.
I cloned the project, look around codebase, try to smoke test. but dependencies between sub-projects there are complex . I was tangled by obscure architecture, even compilation is not easy.
For example, I want to find out how the OrderSend() be encapsulated, but failed. there are many variant, some of which are imcomplete.
Maybe we need a minimum viable product with startup doc, let anybody to check easly.
Respect to your heavy work.
@janckerchen
Compilation should be simple, copy/clone EA31337-classes and EA31337-strategies dirs into platform's Include folder, place EA31337-Libre in platform's Experts folder, the MQL4 compilation should be smooth (any class file should be compiled successfully, or the main Libre mq4 or mql5 file). The code should be compatible with MQL5 also, but it may need some additional work.
Goal of Libre project is to have minimum viable product, but it may take few weeks to make it working.
In MetaEditor you can find the right methods by jumping into definition (Go To Definition or Alt-G), sometimes it may fail.
OrderSend() is defined in Order.mqh
, but it needs some work for MQL5, it may work for MQL4, but I haven't tested it yet.
Unfortunately I encounter many compile errors. I clone the project use command like this
git clone --recursive https://github.com/EA31337/EA31337-Libre.git
putting code into directory as you mentioned, then:
it seams Libre project outdated. for example :
(in EA31337-Libre.mq4)
void OnTick() {
....
if (tick_change >= MinPipChangeToTrade) {
MqlTradeRequest deal;
MqlTradeResult result;
if (strategies.Signal(deal)) {
trade.NewOrder(deal, result); <---- *looks here*
}
}
}
There is no NewOrder function in Trade.mqh actually. I look around master trunk at last commit, found Orders:: NewOrder() but has been totally commented at all.
Update EA31337-classes and EA31337-strategies to edge commit, compile EA31337-Libre again:
Errors decreased, but not smooth. EA31337-Libre version seems fall behind two core projects.
@janckerchen All class files should compile fine as per CI test, it fails only with the older compiler. Also here at Appveyor, but the tests needs some work. Problems is with Libre code which has not been updated recently after some changes in classes (some methods were renamed), so it needs more work. I'll have a look today or tomorrow to fix the code, so it can compile.
@kenorb thanks for your generous. Just making Libre pass compilation is enough.
All git sub module of Libre are too old, should update to match revised Libre code.
@kenorb I still trace the issue, how is it going? I try to fix it, but lost, especially where the NewOrder()
is.
@janckerchen The NewOrder
is in Orders.mqh
(as you've found it). You can try to uncomment it out. It was commented probably to be able to compile the code properly and creating the new orders needs some work, since the goal is to write the code which works in both MQL4 and MQL5 (so the code implementation is something between), currently it's focusing on compilation on MQL4, but with few improvements, it may work for MQL5. I'll be checking the code within few days, as I was working on the next Lite version recently.
@janckerchen Fixed compilation errors, now it compiles fine for me. Please test, but the code could be not complete (especially placing the new orders).
Commit: 97328f60b9fdfaecbe1b960b64caf046c79e4f7e (includes commits in class files).
@kenorb thx, Libre has passed, but left some slight errors in EA31337-strategies submodule.
Maybe I should close this issue, open another one for further feedback. I can help to fix simple problem with pull request, or waiting your major refactor in few days?
@janckerchen You may create separate issues for each problem, may work.
The issue with NewValue()
(renamed to Add()
, it's in Indicator.mqh
)) isn't easy to solve and it can be challenging. It's basically a prototype of class which aims to store the values of the indicator.
I've described the problem in more details at the following job post, but the developer failed to implement it since it's not straight forward, so I'll have to implement it once I find some time, or you can store the indicator values in different way, or rewrite how strategy is implemented for your own purpose.
If you manage to implement this class in order to store the values in the way it's currently designed, I'm happy to pay you a bounty.
NewValue()
has been renamed to Add()
and can be found in Indicator.mqh
class file. The usage and goal of the class is demonstrated in Indicator.mq5
(which works as a test file).
Ideally Add()
should store different type of values (double or int), so it can detect what kind of value is being passed and store it into appropriate series of variables. Some sample codes found in MT5 platform are using MqlParam
struct for similar approach of storing multiple values of different types.
The advantage of storing indicator values in own array is easier access, no need to call indicator functions for each value (for performance reasons). Having series of values at one place it's easier to find some ways to parse them by some class strategy. MT5 platform is using handlers, so the access to indicator values is improved, so basically Indicator is some common solution between MT4 and MT5.
If you would have any specific problems or bugs, raise a new issue in relevant repository, so we can solve them. The project is still on-going and the goal is to provide end-to-end working stable EA working on both MQL4 and MQL5 with easy to manage code and extendable customizable strategies.
It's amazing job for professional mql4 developer, never give up please.
What's the plant for next few months?