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
The codes have been updated.
Apparently, it's some kind of school of thought when they write it like that
ZY
CorrectStopLoss(POSITION_TYPE_BUY,InpStopLoss)Apparently it's some kind of school of thought to write it like that
Why not like this?...
ZY
CorrectStopLoss(POSITION_TYPE_BUY,InpStopLoss)What's the difference? Didn't look at the code - is that such a typo there, or is that your question?
Maybe because codes are needed in the base not for logical deductions and hundredfold nesting, but for beginners to understand?
Where is the inversion? If a position satisfies the conditions, we work with it. continue - output.
Is there a difference? Didn't look at the code - is that such a typo there, or is that your question?
Where's the twist? If a position satisfies the conditions, we work with it. It's a diversion.
Ah... So it's just someone's preferences.
For example, Igor Kim's codes have such nesting. Such code can be written more compactly (it is strange that you, with your attachment to brevity, suggest multiple nesting of code blocks which can be easily avoided by cleaning up the code and making it more illustrative):
You propose this logic:
Or you can do it this way:
The second code is clearer and shorter
fxsaber:
What's wrong? Well, I guess they decided to fix it so that there would be no questions like you had earlier.
But now, if someone decides to modify the Expert Advisor to work with pending orders, he will have to change back and forth, because there will be an error in the input enumeration.
And ORDER_TYPE_BUY == POSITION_TYPE_BUY and ORDER_TYPE_SELL == POSITION_TYPE_SELL are 0 and 1. So there is no difference. But the input ENUM_ORDER_TYPE makes it easier to modify for other types of orders.
Ahhhh. That's just someone's preference.
For example, Igor Kim's codes have such nesting. Such code can be written more compactly (it is strange that you, with your attachment to brevity, suggest multiple nesting of code blocks, which can be easily avoided by cleaning up the code and making it more illustrative):
You propose this logic:
Didn't show anything like this. Kim was forced to do so because of the lack of a strict directive at that time.
He suggested this option:
You can do it this way:
The second code is clearer and shorter
Didn't show anything like that. Kim was forced to do so because there was no directive at the time.
That's what he suggested:
And this?
Forum on trading, automated trading systems and testing trading strategies.
Expert Advisors: Diff_TF_MA_EA
fxsaber, 2018.02.02 09:36 pm.
Where is the reversal? If the position meets the conditions, work with it. If the position meets the conditions, we work with it.
Didn't show anything like that. Kim was forced to do so because there was no directive at the time.
Strange, how did I manage to work with continue without strict back then? And I was not the only one - Vitya Nikolaev (Vinin) told me to do it at that time.
So, I don't understand your complaint about the code and the programmer who wrote it in some of his preferences.