- Articles on the development of trading applications
- When MetaTrader 5 Web Terminal is indispensable
- Working with Projects - Projects and MQL5 Storage
Thank you all for having me. Having received no answers on my posed questions, I went over to amazon and purchased a c++ guide and figured out a couple of things by myself. I'll try to answer these questions, but anyone is free to chip in some info I might have missed during my brief and urgent search.
1. Virtual functions.
These types of functions are usually preceded by the term 'virtual', and are used when overwriting a function in a class. Say, we have a function that calculates mass in our base class, but we would like to add optional height in the function without altering the contents of the base class. A virtual function may be used. Functions declared as virtual in the base class are virtual by default in all derived classes.
2. Go through script examples that are provided when installing the terminal. They don't explain much, but can be helpful to someone with sufficient understanding of code.
3. Being a Mathematics major student, I understand Math concepts very easily. A couple of YouTube videos on how NN are being applied out there provided a good start, including coding videos, although they were mostly coded in python. I believe that C++ is a quite sufficient language and can be used to code Machine Learning algorithms, provided one has sufficient knowledge, creativity and will. I'm well on my way with custom libraries almost ready, thanks to all contributors of many informative articles and documents on the forum.
4. It is. OpenCL can be used to speed up computational capabilities of a program since it paves way for multi-threaded matrix multiplication and a lot more other features. OpenCL language is not far from MQL and any willing person can tap their much needed computation power to speed up the operations of their programs.
5. Custom types require additional care to ensure that default constructors and destructors are carefully assigned. The compiler only assigns constructors and destructors in cases where they are not explicitly defined. (More research on how to avoid them is underway. I only know that they occurred due to erratic use of object pointers.)
I hope it helps a learner somewhere. Feel free to contribute. Peace!
Sorry to write a comment here that is not directly related to the forum subject.
I am also very new into trading and saw some EA that need some modification on the code to make it more profitable. One way i saw that i can improve is on probability issue. There is always ups and downs on trading and i need somewhat my EA to switch startegy which i also need to encode later on. But the way it switches is by counting the orders closed in the profit history like every (nth number) for the currency pair. This EA will only trade one at a time, so the orders in the order history for each pair will not be that difficult to count. If like for example i want to count every 7 trades and after 7th trade number of wins are more than number of loss (4wins 3losses) then use current or continues trading with the current strategy, then will continue to count the next 7 currency pair trades (8th-14th) then if number of wins is now less (2wins 5losses) then it will switch strategy but will continue to count the order history from where it last stop like 15th-21st, if wins are more the continue and continue to count next 7 closed trades until there more losses again like if for the (29th-35th) there are (3wins 4losses) then it goes back to the first strategy but the first strategy will have to start counting on the last order for the next 7 close trades again.
I badly need to know how to encode this or do you have a source code for this?
Hope you respect this post. Thanks!!
- www.mql5.com
Sorry to write a comment here that is not directly related to the forum subject.
I am also very new into trading and saw some EA that need some modification on the code to make it more profitable. One way i saw that i can improve is on probability issue. There is always ups and downs on trading and i need somewhat my EA to switch startegy which i also need to encode later on. But the way it switches is by counting the orders closed in the profit history like every (nth number) for the currency pair. This EA will only trade one at a time, so the orders in the order history for each pair will not be that difficult to count. If like for example i want to count every 7 trades and after 7th trade number of wins are more than number of loss (4wins 3losses) then use current or continues trading with the current strategy, then will continue to count the next 7 currency pair trades (8th-14th) then if number of wins is now less (2wins 5losses) then it will switch strategy but will continue to count the order history from where it last stop like 15th-21st, if wins are more the continue and continue to count next 7 closed trades until there more losses again like if for the (29th-35th) there are (3wins 4losses) then it goes back to the first strategy but the first strategy will have to start counting on the last order for the next 7 close trades again.
I badly need to know how to encode this or do you have a source code for this?
Hope you respect this post. Thanks!!
That's your idea man. It's impossible that I'd have a source of an idea I've never seen. If you are a programmer, you can code the idea then ask for help here. Not ask for a source. Then, encoding is different from coding. :)
You can create a public project on MetaEditor then update me. I might be interested and join.
- Then don't. Don't Hijack other threads for your off-topic post. Next time, make your own, new, thread.
- Get history for the symbol/strategy, sort it, count it, decide. Use a different Magic number for each strategy, e.g. enum Strategy {…}; …
MN=MNbase+strategy.
- Show us your attempt (using the CODE button)
and state the nature of your problem.
No free help 2017.04.21Or pay someone. Top of every page is the link Freelance.
Hiring to write script - General - MQL5 programming forum 2018.05.12
Sorry to write a comment here that is not directly related to the forum subject.
I am also very new into trading and saw some EA that need some modification on the code to make it more profitable. One way i saw that i can improve is on probability issue. There is always ups and downs on trading and i need somewhat my EA to switch startegy which i also need to encode later on. But the way it switches is by counting the orders closed in the profit history like every (nth number) for the currency pair. This EA will only trade one at a time, so the orders in the order history for each pair will not be that difficult to count. If like for example i want to count every 7 trades and after 7th trade number of wins are more than number of loss (4wins 3losses) then use current or continues trading with the current strategy, then will continue to count the next 7 currency pair trades (8th-14th) then if number of wins is now less (2wins 5losses) then it will switch strategy but will continue to count the order history from where it last stop like 15th-21st, if wins are more the continue and continue to count next 7 closed trades until there more losses again like if for the (29th-35th) there are (3wins 4losses) then it goes back to the first strategy but the first strategy will have to start counting on the last order for the next 7 close trades again.
I badly need to know how to encode this or do you have a source code for this?
Hope you respect this post. Thanks!!
Thank you all for having me. Having received no answers on my posed questions, I went over to amazon and purchased a c++ guide and figured out a couple of things by myself. I'll try to answer these questions, but anyone is free to chip in some info I might have missed during my brief and urgent search.
1. Virtual functions.
These types of functions are usually preceded by the term 'virtual', and are used when overwriting a function in a class. Say, we have a function that calculates mass in our base class, but we would like to add optional height in the function without altering the contents of the base class. A virtual function may be used. Functions declared as virtual in the base class are virtual by default in all derived classes.
2. Go through script examples that are provided when installing the terminal. They don't explain much, but can be helpful to someone with sufficient understanding of code.
3. Being a Mathematics major student, I understand Math concepts very easily. A couple of YouTube videos on how NN are being applied out there provided a good start, including coding videos, although they were mostly coded in python. I believe that C++ is a quite sufficient language and can be used to code Machine Learning algorithms, provided one has sufficient knowledge, creativity and will. I'm well on my way with custom libraries almost ready, thanks to all contributors of many informative articles and documents on the forum.
4. It is. OpenCL can be used to speed up computational capabilities of a program since it paves way for multi-threaded matrix multiplication and a lot more other features. OpenCL language is not far from MQL and any willing person can tap their much needed computation power to speed up the operations of their programs.
5. Custom types require additional care to ensure that default constructors and destructors are carefully assigned. The compiler only assigns constructors and destructors in cases where they are not explicitly defined. (More research on how to avoid them is underway. I only know that they occurred due to erratic use of object pointers.)
I hope it helps a learner somewhere. Feel free to contribute. Peace!
If you want answer, I think you should not post so much different unrelated questions. Also you need to be more specific.
I read your initial post and don't even know where to start, that's just to much. I would suggest you to create 1 topic for each point and ask specific questions which will show the efforts you made to find an answer by yourself without success.
And you title is not good, the title of a topic should always talk about the content. And beside that there are also woman on this site, and every
where. don't start to be offending by excluding them by advance.
If you want answer, I think you should not post so much different unrelated questions. Also you need to be more specific.
I read your initial post and don't even know where to start, that's just to much. I would suggest you to create 1 topic for each point and ask specific questions which will show the efforts you made to find an answer by yourself without success.
And you title is not good, the title of a topic should always talk about the content. And beside that there are also woman on this site, and
every where. don't start to be offending by excluding them by advance.
Okay. Thank you for the heads-up.
Hi, I am newbie here. Know little of your advanced users forum etiquette. The tone of some replies is appalling. The original poster is a mathematician not a frequent poster here.
Alain, This is just plain rude. " And beside that there are also woman on this site, and every where. don't start to be offending by excluding them by advance. " I did a search for "He and She" the original poster does not use them. So you Alain are way off topic.
Hi, I am newbie here. Know little of your advanced users forum etiquette. The tone of some replies is appalling. The original poster is a mathematician not a frequent poster here.
Alain, This is just plain rude. " And beside that there are also woman on this site, and every where. don't start to be offending by excluding them by advance. " I did a search for "He and She" the original poster does not use them. So you Alain are way off topic.
Please don't bring up year old topics for no good reason.
Complaining about users' tone is not a good reason.
You may have looked for he or she, but you failed to notice "man" in the title!
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use