Flat zone indicator
- 지표
-
Evgeniy Inkov
Профи МТ4.
Научу программировать на МТ4 любого !
Почта: ew123@mail.ru - 버전: 1.0
- 활성화: 5
The indicator displays the flat zone areas, resistance/support levels on the screen and is designed for manual trading along the trend or within the flat.
For trading along the trend, the order is opened at the beginning of the second zone in the same direction, and the stop‑loss is placed outside the first zone boundary (Fig. 1).
For trading within the flat zone, the order is opened at the boundary of the zone and is directed inward; the stop‑loss is placed outside the zone boundary (Fig. 2).
These are two simple but effective trading strategies; you can look for other trading strategies using flat zones online.
Previously, flat zones were usually drawn by hand; this process was not simple, as it required some skill and constantly involved adding new zones to the screen.
With the use of an indicator, the process of drawing zones becomes automatic, which allows you to quickly respond to market changes and, accordingly, make the right decisions.
In addition to flat zones, the indicator shows resistance/support levels, which are necessary for determining the order entry levels, setting take‑profit and stop‑loss levels.
The indicator shows current resistance/support levels, as well as those that have already been tested (old). If you need to disable the tested resistance/support levels, you can use the indicator’s input parameters (show_RS_old).
In the input parameters, you can set the timeframe of the indicator on which the zones will be drawn, which is very convenient for viewing them on lower timeframes.
The indicator does not display zones and levels if the current timeframe is greater than the one set in the input parameters.
The most important input parameter of the indicator is the flat coefficient (koef_flat), which can be adjusted from 10% to 90%.
Using it, you can set the flat height (in my experience, the optimal value is 65%). But you can experiment and adjust it to suit your trading conditions.
The larger this coefficient, the wider the flyte zone and the more bars it covers. This coefficient is used in rather complex mathematical calculations of the indicator, which is why it is conventionally called the “flyte coefficient” here.
The vertical line marks the beginning of the zone drawing on the screen. By moving it, you can set the required beginning of the drawing.
It is very convenient to overlay two indicators with different timeframes on one screen. To do this, you need to set different names and colors for the vertical lines in the input parameters of these indicators so that you can see the beginning of the drawing of their zones. Of course, you can keep the same names for the vertical lines, in which case both indicators will start from the same vertical line. But in this case, on a lower timeframe, there will be a lot of bars, which will require more computational resources to draw all the zones and levels. To display two indicators more clearly on one screen, you can set different colors for the zones and lines, their styles and thickness, as well as fill the fleat zones with color or leave them unfilled (fon_Rect) (Fig. 3).
Input parameters of the indicator:
- TF — timeframe of flat zones and resistance/support levels
- koef_flat — flat coefficient, varies within 10% ... 90%
- fon_Zone — determines whether zones are filled (true) or not filled (false) with color.
- clr_UP_Zone — the color of the zone if it is higher than the previous one.
- clr_DW_Zone — the color of the zone if it is lower than the previous one.
- style_Line_Zone — the style of the zone line if the zone is not filled with color.
- width_Line_Zone — the thickness of the zone line if the zone is not filled with color.
Parameters of resistance/support lines
- clr_Resistance — the color of the resistance lines.
- clr_Support — the color of the support lines.
- style_RS — the style of the resistance/support lines.
- width_RS — the thickness of the resistance/support lines
Parameters of the used resistance/support lines (old)
- show_RS_old — display (true) or disable (false) the used resistance/support lines
- clr_Resistance old — the color of the used resistance lines
- clr_Support old — the color of the used support lines
- style_RS_old — the style of the used resistance/support lines
- width_RS_old — the thickness of the used resistance/support lines
Parameters of the vertical line (the line where drawing begins)
- name_VLine — the name of the vertical line
- clr_VLine — the color of the vertical
- line style_VLine — the style of the vertical line
- width_VLine — the thickness of the vertical line
--------------------------------------------------------------------------------------------------
The indicator is designed to work on any symbols and timeframes.
The speed of the indicator’s operation depends on the number of bars captured from the vertical line to the current bar, so it is advisable to choose the optimal placement of the vertical line.
The load on the indicator usually affects its performance in the strategy tester; in real trading, this is not of great importance.
