There is many trading systems based on technical analysis whether they are indicators
or graphical drawings, that have an important property. I mean the symmetry of
such systems in the trading direction. Due to this property, trading signals and
the mechanics of placing trade orders in such systems can be generally expressed
as relative to their directions.
A simple approach described below allows effective using this property to significantly
reduce the code length of Expert Advisors based on such symmetric systems. Expert
Advisors using this approach utilize the same code for detecting trade signals
and generating trade orders, for both long and short positions.
It is a common practice that developing an Expert Advisor based on a symmetric system,
one first codes generation and processing of trade signals in one direction and
then copies the code and refines it for the other direction. In this case, it is
very easy to make an error and then it is very difficult to detect such an error.
So the decreasing the amount of possible errors in the Expert Advisor's logic is
an additional advantage of the approach considered.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Abstract:
There is many trading systems based on technical analysis whether they are indicators or graphical drawings, that have an important property. I mean the symmetry of such systems in the trading direction. Due to this property, trading signals and the mechanics of placing trade orders in such systems can be generally expressed as relative to their directions.
A simple approach described below allows effective using this property to significantly reduce the code length of Expert Advisors based on such symmetric systems. Expert Advisors using this approach utilize the same code for detecting trade signals and generating trade orders, for both long and short positions.
It is a common practice that developing an Expert Advisor based on a symmetric system, one first codes generation and processing of trade signals in one direction and then copies the code and refines it for the other direction. In this case, it is very easy to make an error and then it is very difficult to detect such an error. So the decreasing the amount of possible errors in the Expert Advisor's logic is an additional advantage of the approach considered.