Indicators: Other_Candles

 

Other_Candles:

The indicator draws candlesticks in a separate window in the form of a histogram from the zero line.


Author: Scriptor

 
The idea is interesting, but the implementation is terrible. What's the point of having the colour of candles in input parameters? Why did you have to write a separate function to determine the type? And even use enumerations??? Isn't it enough to compare Open > Close... and vice versa?
 
Alexey Viktorov:
The idea is interesting, but the implementation is terrible. What's the point of having the colour of candles in input parameters? Why did you have to write a separate function to determine the type? And even use enumerations??? Isn't it enough to compare Open > Close... and vice versa?
Such codes are written most likely for educational purposes. It is more important to show the possibility.
 
Artyom Trishkin:
Such codes are written most likely for training purposes. It is more important to show the possibility.

For educational purposes, you should write code to learn how to DO things. And this is the second person I know who writes examples of how NOT to do it.

In my non-professional opinion, the possibilities are limited only by the impossibility of verbal description of what you want, or a description like "well, you see, you get a squiggle...".

 
Alexey Viktorov:

For educational purposes, you should write code to learn how to DO things. And this is the second person I know who writes examples of how NOT to do things.

In my unprofessional opinion, the possibilities are limited only by the impossibility of verbal description of what you want, or a description like "well, see, it's a squiggle...".

Honestly. I don't understand your attitude of fawning over everything in kodobase. Does listing them give you a toothache? You know about them. And someone will see a new opportunity for themselves.
Where's the other awfulness in the code?
 
Artyom Trishkin:
Honestly. I don't understand your attitude of fawning over everything in kodobase. Listing them gives you a toothache? You know about them. And someone will see a new opportunity for themselves.
Where else is the awfulness of the code?

Not everything. I don't even watch much of it. I don't need it. If someone has not seen the possibility to write their own enumerations, they may see them where they are really needed. And to hell with them, with enumerations, but to write colour in inputs, and even in mql5, is beyond my understanding. And on top of that these inputs are not used in any way ... What does Renat call such codes???? That's exactly what it is...

 
Alexey Viktorov:

Not everything. I don't even watch much of it. I don't need it. If someone has not seen the possibility to write their own enumerations can see them where they are really needed. And to hell with them, with enumerations, but to write colour in inputs, and even in mql5, is beyond my understanding. And on top of that these inputs are not used in any way ... What does Renat call such codes???? That's exactly what it is...

Unfortunately, I can't see the code from my mobile.
If the code is terrible only because of "faith", then you have to consider that someone else's faith is contemptible.
How do you determine that the selected order type is SellStop? By numbers? Or what is more convenient? It's all the same to the programme, but to a person?
 
Artyom Trishkin:
Unfortunately, I can't see the code from my mobile.
If the code is terrible only because of "faith", then you should take into account that your faith is also contradictory to someone else.
How do you determine that the selected order type is SellStop? By numbers? Or what is more convenient? It's all the same to the programme, but to a person?

Teach me how to determine by numbers in mql5.

 
Alexey Viktorov:

Teach me how to define with numbers in mql5.

The help has all the enumerations.
 
Artyom Trishkin:
The reference has all the enumerations.
Enumerations or numbers?
 
Alexey Viktorov:
Enumerations or numbers?
   Print("Цифирь у ORDER_TYPE_SELL_STOP такая: ",ORDER_TYPE_SELL_STOP);