
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 number of orders function will not work, because the EA is set differently for each pair. And orders are set for different pairs at the same time. Then if four orders are placed for two pairs and one triggered, three of them are deleted and the opposite one should be deleted for all pairs.
All functions of KimIV will "filter" orders by type+pair+magic. I.e. (for me! :) not to run and search - from this page "SecondsAfterCloseLastPos(string sy="", int op=-1, int mn=-1)" ) by calling "Count there some" For sure you will get the real opened orders for this currency pair or even with this EA.
ZS I meant the function
from page 12.
All functions from KimIV 'filter' orders by type+pair+magic. I.e. (to me! :) not to run and search - from this page "SecondsAfterCloseLastPos(string sy="", int op=-1, int mn=-1)" ) by calling "Count there some" For sure you will get the real number of open orders on this pair or even with this EA.
ZS I meant the function
from page 12.
Thank you! Very helpful! I'll look into it.
How to make trailing stop was put once +5 pips and not transferred further, closing was done by
How do I use trailing stop if it is already set by the indicators? If you can give an example!!!
Probably not... I only have two: index finger and grip... >> hee
Igor, I have a crush on you, even though I'm not gay. After all, you can work as Zadornov, too.
SecondsAfterOpenLastPos() function.
This function returns the number of seconds since the last position was opened. The selection of positions to be taken into account is set by external parameters:
I am of course wildly sorry, what you are doing is certainly a good thing.
But HOW you do it, I don't like it at all.
1. the fact that you describe the names of the variables is great, but every time you have to look in the header to see what the next wild abbreviation means, it's hard to understand what the variable stands for, you forget what you wanted to find out in the code. Can't you write a QUALITY self-documented code, which even without comments will be understandable to someone who knows English, especially as you are doing it for others and others with this quality will never find a mistake in code, if there is one.
2. Overloaded functions. Versatility is a BAD thing, 6 parameters for a function is too much.
3. Code simplicity
Example.
This is your code. Let's see what you can do with it:
Shall we compare the code? It does the same thing.
1. Yes, my code is bigger, but after all, we don't live in the age of floppy disks, is there not enough space?
2. My code is much clearer inside. Even without the comments, which are pasted in place.
3. Your function has nesting 7, mine has 2, is there a difference?
4 It's one of the few functions that isn't overloaded, but opening, modifying and so on is a nightmare.
SZZH: Respect the people you're writing it for.
Но КАК вы это делаете, мне абсолютно не нравится.
-1. Disagree. Absolutely fine with everything, both in form and content. Please continue in exactly the same format.
Exactly. And the smaller the code, the easier it is to read. I hate fonts "smeared" on 2-3 screens. A function should be all in one screen, without flipping through it. That is why I am for compactness.
Is it okay that you have a lot of optional continuums which, by the way, again pull the reader's attention away?
DeleteOppositeOrders() function.
This function deletes one or more orders opposite to the position, the type of which is specified in the op. For example, for a Buy position the opposite orders would be SellLimit and SellStop. The deletion of the opposite order becomes necessary if, for example, two opposite orders are set and one of them triggers.