A semaphore signal indicator with a prediction. The newest signal appears on the bar distanced from the current bar. The distance is defined by an input parameter
input uint HowManyBars=5; // number of bars for analysis
Figure 1. The NxBars indicator
Translated from Russian by MetaQuotes Software Corp.
Original code: https://www.mql5.com/ru/code/2212
The indicator draws support and resistance lines, which are defined by the maximum and minimum for the last N bars.The Moving Average Class
Uses the idea of the classical moving average smoothing. The class can be used when you want to smooth out any array of type double without using the standard indicator.