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

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

author EAcpu | 2 reads | 0 comments |

Confluence Detector - indicator for MetaTrader 5

Confluence Detector - indicator for MetaTrader 5

Confluence Detector - indicator for MetaTrader 5

This indicator plots three lines on the chart. It detects the current period and assigns two other periods in the input which should be compared with the current period.

Confluence Detector - indicator for MetaTrader 5

If price is not moving in the same direction on the other timeframes you choose, the lines will diverge from each other, indicating a lack of convergence between these timeframes.

When the lines separate, it can be a signal to avoid trading during this period. Trading is safer when multiple timeframes overlap.

Confluence Detector - indicator for MetaTrader 5

It is an experimental indicator. A simple minimal science experiment.

The first chart is a line chart of closing prices for the current period.

The second graph is the deviation of the first input time frame from the current period.

The third graph is the deviation of the second input time frame from the current period.

The current time range must be higher than the other two time ranges selected in the input. Take a closer look at the screenshot as an example.

TF 1 (current): M30

TF 2 (deviant): M15

TF 3 (deviant): M5

Six M5 bars and two M15 bars are tested against the M30 bar closing price direction. The lower time frame closing price is within M30 time block, so naturally the lower timeframe bars will complete first and update the deviation chart for the current higher timeframe.

M30 Bar Wrapping {M15 Off + M15 Off}

M30 Bar Wrapping {M5 Off + M5 Off + M5 Off + M5 Off + M5 Off + M5 Off }

The closing prices on these lower timeframes cause the chart to distort based on the bar closing position (each timeframe bar has a closing price). Data is recorded when both bars are open (current) and closed (historical), so the price movement of the current unclosed bar is taken into account.

Visually, it is a trend indicator, but it is important to note that this is not a tick indicator, as the historical data is based on OHLC - the resulting visual chart is based on where the bar finally closed.

In this case, the term "convergence" is used to check whether the closing prices of different timeframe bars are harmonious (similar) with respect to the selected timeframe. If there is a lot of noise and volatility, it will be registered by line expansion (lines moving away from each other), and if the closing prices are consistent (similar), it will be registered by line contraction (lines moving closer to each other).


Attachment download

📎 timeframe_confluence_detector.mq5 (4.25 KB)

Source: MQL5 #49345

Verification code Refresh