[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 19
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
how to convert this formula to points?
I'm wondering how to optimise the code to speed up the owl in the tester. Can you please tell me how to execute the loop faster, like this:
or like this:
and any other tips for speeding up the EA?
how to convert this formula to points?
In mql4 there is a full check of conditions, i.e. all expression that is in brackets if() will be checked to the end, so sometimes it's reasonable to break complex conditions into several conditions:
if(a>b && c>d) can be replaced with if(a>b){ if (c>d)..... }
So the first variant of the code proposed by you will work a bit faster, though from practice - the enumeration of orders does not load the processor much, mathematical operations load the processor much, it makes sense to look for increasing the code performance - not all calculations have to be performed every tick
In mql4 there is a full check of conditions, i.e. all expression which is in brackets if() will be checked to the end, so sometimes it is reasonable to break complex conditions into several conditions:
if(a>b && c>d) can be replaced with if(a>b){ if (c>d)..... }
So the first variant of the code you suggest will work a bit faster, though from practice - order search does not load the processor much, mathematical operations load the processor much, it makes sense to look for increasing the code performance - not all calculations need to be performed every tick
I see. Thank you:
or the same normalization in the conditions:
slows down the execution of EAs a lot?
slows down the execution of EAs much?
I see. thank you. but tell me Print for example after closing an order:
or the same normalization in the conditions:
slows down significantly the execution of EAs?
The Print() operation is an operation with a file (in this case, a log file). And these operations are VERY slow (compared to processing data from memory). CONCLUSION: Create a variable which is initialized in init()
And print by condition of this variable (this is ONE option).
The normalization example you have given makes no sense, if we proceed from the stated objectives (code optimization). Normalization is REQUIRED according to the technical requirements of the brokerage server, in order to execute a trade order ONLY for price and STOP.
Dear speculators, help! Looking for an EA which automatically sets SL and TP when opening a position.
I am very grateful in advance.