[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 491
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
TarasBY, thanks for the explanations and the function!
I'm taking the function to my collection, but I don't understand something:
If the parameter fi_LevelBU is negative, it means shift of the TP to profit, while if it is positive, it means profit or vice versa?
Correct (not vice versa).
And the second: is it better to check for constraints within the function itself or outside the function?
Everyone decides for himself. I have created a library that is responsible for executing trade orders and checks for all limitations.
P.S. There was a small error in the function code (extra parenthesis) - I fixed it.
Guys, advise how to fix the problem
If you use in the Expert Advisor
then for some reason advisor continues to work even when the button "advisors" is released I need it to be disabled and when I use this cycle when an EA is working it is impossible to open properties of the EA, may be someone knows how to fix the EA ????? I know about sleep(......);
Guys, advise how to fix the problem
If you use in the Expert Advisor
then for some reason advisor continues to work even when the button "advisors" is released I need it to be disabled and when I use this cycle when an EA is working it is impossible to open properties of the EA, may be someone knows how to fix the EA ????? I know about sleep(......);
Perhaps it's not this cycle that's "looping" the EA!
I think not, as there is only one cycle for counting orders
Would it be better to use such a construction:
It might be better to use a design like this:
then there is no desired result .... This loop is specifically applied to .... The Expert Advisor receives one tick and works without ticks in a special loop
Hmm, interesting task. Maybe we should make the EA dependent on tick arrival after all. I think that after the first tick the EA will not care about the signal to turn it off. Try to use a for loop:
When the EA has worked 10,000 times (or any other number of times that you need), then it will wait for a new tick to come in order to start the loop again. And if at this point, it receives a signal to stop working, it should switch off. It will be interesting to see if this works.
TarasBY, thanks again))
For me such libraries are still "tough", but I'll try to figure it out))
I think not, because then only one cycle is used to count orders