Expert Advisors • Indicators • Scripts • Libraries

MQL.RobotFX.org is the biggest collection of MetaTrader expert advisors (MT5 & MT4), indicators, scripts and libraries that can be used to improve trading results, minimize risks or simply automate trading tasks

MetaTrader 5 Script | Bar Prediction

MetaTrader Experts, Indicators, Scripts and Libraries MetaTrader Experts, Indicators, Scripts and Libraries

Example:

Run the script on Daily timeframe, see the results on D1 & M1.


Comment:
The script was not originally written to calculate support and resistance lines.
But it seems, it could be used for this purpose as well.

Inputs:

Prediction_Bar >= -1 : 0 means current bar, -1 the next bar, +1 the first previous bar and so on.

Win > 0 : Length of comparison window for stream similarity.

Num > 0 : Number of illustrated bars.

Note:

Aqua: The best match stream (shifted).

DarkOrange: Bar close.

Lime: Predicted bar.

Red: Bar high.

Blue; Bar low.

Yellow: Predicted area.

Bar text: Similarity error.

40357