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.