Hello there,
I have followed the instructions of <a href="https://www.mql5.com/en/articles/496">this cool article</a> written by Дмитрий to create Pithecus, my first EA. Pithecus, which means monkey in old Latin, is able to open a position on a symbol every given number of seconds. We will all agree that this is not a very profitable trading strategy!, but because it is a very simple one Pithecus is rich in teaching objectives, IMHO.
I've also tested Pithecus in MT5's Strategy Tester and everything works as expected, I think. However, I would be very pleased to receive some feedback from you to ensure that my first FOREX robot is technically correct. So could you please help me and have a look at the following MQL5 program? Can you see any error? All comments are welcome. Thank you very much in advance!
As you said :..everything works as expected", so if no error, it's ok.
Note : this EA only provide BUY order, right? I think you need to add SELL order.
As you said :..everything works as expected", so if no error, it's ok.
Note : this EA only provide BUY order, right? I think you need to add SELL order.
Thank you! Your response is very helpful. Congratulations for all your work with EAs.
I did not put any sales order because I felt that it was the same concept as the purchase. I've applied the KISS principle as fas as I've been able. After your feedback I will make Pithecus evolve a bit more.
Thank you! Your response is very helpful. Congratulations for all your work with EAs.
I did not put any sales order because I felt that it was the same concept as the purchase. I've applied the KISS principle as fas as I've been able. After your feedback I will make Pithecus evolve a bit more.
Thank you,
I do not know about the KISS principle, but it means you ignore the advantages of the forex market, where we can take advantage of the rising and falling market. This is very different from trading commodities and stocks, where we could only take profit when prices rise.Thank you,
I do not know about the KISS principle, but it means you ignore the advantages of the forex market, where we can take advantage of the rising and falling market. This is very different from trading commodities and stocks, where we could only take profit when prices rise.Yes, I know that in FOREX and financial derivatives you can hold a position long or short, as you want.
The KISS principle states that when writing an app (or making whatever) you should avoid complexity. It is something like a "state of the mind" from which you do things. I applied the KISS principle in Pithecus because I wanted to focus on the technical aspects of my learning process. I thought: "I am not selling because it is technically the same thing as buying, I am going to use a very similar API call!, so let's avoid that line of code".
By the way, you said "if no error when compiling, it's ok". Anyway, I have a question for you and those of you who write EAs. My question is "Is there a log file somewhere where we can see in more detail the result of that compiling process?". Otherwise, I guess that what we have left is the log of the Strategy Tester to obtain more details on the robot. I don't want me to happen this https://www.mql5.com/en/articles/538!!
- 2010.12.15
- Automated-Trading
- www.mql5.com
Yes, I know that in FOREX and financial derivatives you can hold a position long or short, as you want.
The KISS principle states that when writing an app (or making whatever) you should avoid complexity. It is something like a "state of the mind" from which you do things. I applied the KISS principle in Pithecus because I wanted to focus on the technical aspects of my learning process. I thought: "I am not selling because it is technically the same thing as buying, I am going to use a very similar API call!, so let's avoid that line of code".
By the way, you said "if no error when compiling, it's ok". Anyway, I have a question for you and those of you who write EAs. My question is "Is there a log file somewhere where we can see in more detail the result of that compiling process?". Otherwise, I guess that what we have left is the log of the Strategy Tester to obtain more details on the robot. I don't want me to happen this https://www.mql5.com/en/articles/538!!
I think no log files for compiling process, but in strategy tester we can obtain log files.
If technical errors like https://www.mql5.com/en/articles/538, in this case the trailing stop, then we will know from Strategy Tester logs. But if the error occurred due to mistake of strategy will not be recorded in the log, we only know from the strategy tester results, whether profitable or not.
- 2010.12.15
- Automated-Trading
- www.mql5.com
I think no log files for compiling process, but in strategy tester we can obtain log files.
If technical errors like https://www.mql5.com/en/articles/538, in this case the trailing stop, then we will know from Strategy Tester logs. But if the error occurred due to mistake of strategy will not be recorded in the log, we only know from the strategy tester results, whether profitable or not.
Yes, those are the so called "execution errors" such as an infinite loop, etc. which are only detectable by humans. For those of you wondering this question here you have this great article here: https://www.mql5.com/en/articles/586
Ok, I am glad :-) to know that I am on the right way and hope soon to share with you a slightly more sofisticated EA. I didn't expect to find here so much research in automated trading as I am seeing right now. This is one of the best places in the world in this area, sure. Thank you!
- 2012.11.09
- MetaQuotes Software Corp.
- www.mql5.com
Are you sure you really read that article, following it and learning from it ?, because if you are, your code is showing that you are NOT reading it.
1. You use input for symbol, and yet you don't use it
input string Pair = "EURUSD";
2. You Working with Events, yet you're not killing your EventSetTimer using EventKillTimer in OnDeinit. In fact your code does not have OnDeinit().
3. You only have open buy - which will open buy position for more on every OnTimer(), and you don't have sell trade, which in MT5 is also useful to close a buy position.
I won't call your code an EA, and I suggest you to learn more and in the future, please post a decent EA in the forum.
And NO, I don't think you read that article, because if you read it, you won't create something like this.
<EDIT : your code here https://www.mql5.com/en/forum/9759 still have error but much better than this>
- www.mql5.com
Are you sure you really read that article, following it and learning from it ?, because if you are, your code is showing that you are NOT reading it.
1. You use input for symbol, and yet you don't use it
2. You Working with Events, yet you're not killing your EventSetTimer using EventKillTimer in OnDeinit. In fact your code does not have OnDeinit().
3. You only have open buy - which will open buy position for more on every OnTimer(), and you don't have sell trade, which in MT5 is also useful to close a buy position.
I won't call your code an EA, and I suggest you to learn more and in the future, please post a decent EA in the forum.
And NO, I don't think you read that article, because if you read it, you won't create something like this.
<EDIT : your code here https://www.mql5.com/en/forum/9759 still have error but much better than this>
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello there,
I have followed the instructions of <a href="https://www.mql5.com/en/articles/496">this cool article</a> written by Дмитрий to create Pithecus, my first EA. Pithecus, which means monkey in old Latin, is able to open a position on a symbol every given number of seconds. We will all agree that this is not a very profitable trading strategy!, but because it is a very simple one Pithecus is rich in teaching objectives, IMHO.
I've also tested Pithecus in MT5's Strategy Tester and everything works as expected, I think. However, I would be very pleased to receive some feedback from you to ensure that my first FOREX robot is technically correct. So could you please help me and have a look at the following MQL5 program? Can you see any error? All comments are welcome. Thank you very much in advance!