[ARCHIVE]Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Can't go anywhere without you - 5. - page 431
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
Something like this.
Thank you very much!
Hello friends! suggest a function that would add the following condition to this code. If rsi has made two downward passes during n-number of bars. i.e. if rsi has made two downward passes during 30 bars then open order, i can't figure it out.)
You start the counter. Then when you run it through the history, it counts by the condition: "If it crosses down, you add one to the counter... "etc.
Learn and take your time and you'll get it right!
You start the counter. Then when you run it through history, it counts by the condition: "If it crosses downwards, add one to the counter... " etc.
Learn and take your time and it will all work out!
So there is a crossing counter, there it is: now we need a bar counter, but how?)) so that L can get a value of "2" only if the crossovers happen within 30 bars
I started to think. I looked into Kim's function to dispel my doubts... and my arguments were confirmed. For some reason, the "Free Trade Flow" check only happens at opening и closing orders... And when modifications (initial setting of SL and TP), at traale and during transfer of a position to Breakeven there is no check. Why? After all, in both cases the server is called!
After all, if the trader is then taken, the Expert Advisor logically will not set stops, for example, and will not do anything with the position at all. I do not understand this.
I started to think. I looked into Kim's function to dispel my doubts... and my reasoning was confirmed. For some reason, the "Free Trade Flow" check only happens at opening и closing orders... And when modifications (initial setting of SL and TP), at traale and during transfer of a position to Breakeven there is no check. Why? After all, in both cases the server is called!
After all, if the trader is then taken, the Expert Advisor logically will not set stops, for example, and will not do anything to the position at all. I do not understand this.
No big deal. Set it on the next tick
It's no big deal. Will set it on the next tick
So in that case, why check on opening or closing? It will be set on the next tick as well :) After all, it may play a great role for a scalper...
So in that case, why check when opening or closing? Will also set on the next tick :) After all, it can play a huge role for a scalper...
So everything is in your hands. So it will be done. Some do it that way.
Again I looked in the reference and again read the lines here:
https://docs.mql4.com/ru/basis/preprosessor/import
Для импорта функций во время выполнения mql4-программы используется так называемое позднее связывание. Это значит, что пока не вызвана импортируемая функция, соответствующий модуль (ex4 или dll) не загружается.
I mean, in order for the library to be loaded, it should be called in the code after the import lines, right?
For example, I did it like this:
1. It turns out that we declare functions. that we will use in the Expert Advisor at the very beginning of code of the Expert Advisor?
2. and not to declare them a lot in the code of the Expert Advisor itself and use header files? I.e. only for declarations?
This question came up because I have seen such Expert Advisors that were written by quite serious programmers, but their header files contain all main and non-main functions. I was surprised by this... The reason is that the speed of compiled libraries is much faster, in addition, the code of library functions is "isolated", which is also very convenient.
https://www.mql5.com/ru/forum/145453