Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

AutoTrendLines - MetaTrader 5 Script | Forex Indicator Download - MT4/MT5 Resources

author EAcpu | 3 reads | 0 comments |

AutoTrendLines - indicator for MetaTrader 5

AutoTrendLines - indicator for MetaTrader 5

AutoTrendLines - indicator for MetaTrader 5

When a new bar appears, the indicator defines points to draw the trend line, and if the coordinates of the points change, it redraws the trend line. When determining points, the current bar will be ignored. The support line is drawn at a low level and the resistance line is drawn at a high level. There are two points of judgment in the indicator. The two types are described below using the support line as an example.

Main parameters:

Type 1. Through two extreme values.

AutoTrendLines - indicator for MetaTrader 5

Type 2. extreme value and delta.

а) Consider drawing a line starting to the right of the left point.

AutoTrendLines - indicator for MetaTrader 5

а) The bar to the right of the left point is not considered when drawing the line.

AutoTrendLines - indicator for MetaTrader 5

*Extreme value refers to a bar with N bars on its left and right sides, with higher lows and lower highs. In fact, the extrema are actually the same as N fractals.

**Delta is calculated using the following formula:

Support: (right price - left price) / (right column index - left column index)

Resistance: (left price - right price) / (right column index - left column index)

suggestion:


Attachment download

📎 autotrendlines.mq5 (11.63 KB)

Source: MQL5 #1220

Verification code Refresh