- Wishes for Meta Trader 4/5
- programing a new robot ea
- The arrival of a new generation of trading software. What should the EA interface be like?
What difference does it make how you code it?
It needs to be profitable and that is the only requirement.
I don't care if it's oop or spaghetti, or anything else, as long as it does what it was designed for.
Focus on what matters.
What difference does it make how you code it?
It needs to be profitable and that is the only requirement.
I don't care if it's oop or spaghetti, or anything else, as long as it does what it was designed for.
Focus on what matters.
There is a lot of hate going on about OO today, if you use more than 3 layers inside an object, it starts to become exponentially more complicated, you have several multiple states, and the glue between objects become hard to code, in functional programming you can have a more reusable and modular code, even java now is adopting this model. I saw in a page: "OOP is when you can reuse the bullet after shooting yourself into the knee". In a functional programming language the states are not shared, so each function is independent, and that makes easier to debug. In my opinion the hardest part of coding is debugging
from a traders perspective,its very true.whethr its c or b or d language,a trader just needs a profitable indicator or EAs
I am not sure if we should view this from a traders perspective.
Maybe Mr.Luck just want's to become a good programmer, and maybe he does not have the intention to make profits what so ever.
First we got imperative, later we get OOP, but the new thing today is functional programming, some say you avoid lots of bugs, and it's very good with large projects, so my question: in this trading field, functional programming can be useful? thanks
If you need to do functional programming in MQL ... my present understanding is that with the current framework it can be simulated...
1. You can create a class with a single method and use it as a lambda function. Something like an inner anonymous class does the same thing despite the unfortunate boilerplate code.
2. Of course there will be no syntactical sugar (although a preprocessor can be written manually if desired but its upto you to implement that, i would only do this if i wanted to commit to it long-term),
3. Nor will there be any automated optimizations under the hood but ...
4. ...you can still get a more declarative style of code (improving readability) and avoiding side effects(by using immutable data structures) which are the core concepts of functional programming.
5. Lastly people who are hating on OOP(or FP) need to understand that any good program will involve attributes of both OOP or FP... What matters is that we need to apply basic programming principles (DRY, YAGNI, SLAP(single level of abstraction), etc) and SOLID principles in any good code regardless of the programming paradigm.
Regards

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use