The
article describes the process of developing and implementing a class
for sending signals based on the moving channels. Each of the signal
version is followed by a trading strategy with testing results. Classes
of the Standard Library are used for creating derived classes.
So, let us start with something
simple that can be improved and revised with the help of the OOP. Let
there be some basic strategy.
This strategy will
consider fairly simple trading rules. Market entries will be made by the
channel borders. When the price touches the lower border a buy position
will be opened, when it touches the lower border - a sell position.
Fig. 1 shows that the price touched the lower border, so the robot
bought a certain volume. The trade levels (stop loss and take profit)
have a fixed size and were placed automatically. If there is position
opened, the repeated entry signals will be ignored.
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.
New article MQL5 Cookbook - Trading signals of moving channels has been published:
The article describes the process of developing and implementing a class for sending signals based on the moving channels. Each of the signal version is followed by a trading strategy with testing results. Classes of the Standard Library are used for creating derived classes.
So, let us start with something simple that can be improved and revised with the help of the OOP. Let there be some basic strategy.
This strategy will consider fairly simple trading rules. Market entries will be made by the channel borders. When the price touches the lower border a buy position will be opened, when it touches the lower border - a sell position. Fig. 1 shows that the price touched the lower border, so the robot bought a certain volume. The trade levels (stop loss and take profit) have a fixed size and were placed automatically. If there is position opened, the repeated entry signals will be ignored.
Fig.1 Entry signal
Author: Dennis Kirichenko