You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Maybe it's not a rational approach to load all open orders with all their parameters into an array.
Perhaps, if I need two parameters profit and stop loss in my code, it is too expensive to run the loop twice.
This is a universal code and we can cut out unnecessary things to speed up the final process...
Simplify
That's why I can't stand OOP. It's impossible to understand anything. No commentary. What is required to be done in the end?
Why don't you just start learning it?
That's why I hate OOP. It's impossible to understand anything. No comments. What is required to be done in the end?
That's the thing: you don't understand, but you have an array structure with all the orders and easy to call anywhere. And you only run the heavy loop once...
Why don't you just start learning it?
Fills the array with function values in the loop. The question is, why do you need a class shell? You can do with a function.
The fewer function calls, the faster the code.
Filling the array with function values in the loop. The question is, why do you need a class shell? You can do with a function as well.
The structure is very convenient - no need to pile arrays and resize them individually. This example does not show the advantages of OOP, just that everyone does it the way he/she is personally comfortable.
That's the thing: you don't understand, but you have an array structure with all the orders and easy to call anywhere. At the same time you only run the heavy loop once...
Gentlemen arguers, let's put it this way, if you don't understand OOP, don't know, then let's argue not procedural programming vs. OOP, but procedural programming with pointers to functions vs. procedural programming without pointers to functions.
No your example is very good.
It's not about procedural programming.
There is a much more important criterion of program quality: code clearness.
The solution you've given is awful: it is not at all clear WHAT function is called meaningfully. I would write a normal switch and a comment against each call. This is the right code.
From your example I conclude that OOP is a harmful thing.
The fewer function calls, the faster the code.