Pershikov Fibonacci Retracement
The indicator plots 5 Fibonacci retracements according to recommendations about trend lifetime given by V.V. Pershikov. All lifetime parameters can be customized. Retracements are plotted at the moment of attaching the indicator to the chart and at the moment of scaling. It is made for increase in productivity. If the indicator re-plots on every tick, its operation will be slowed down due to abundance of calculations which come from check of 61.8 level breakthrough. Plotting can be changed manually after the indicator has finished plotting retracements. Remove the indicator from the chart so it could not change manual settings. Retracements won't be removed.
The indicator was developed in cooperation with V.V. Pershikov.
- EndBarNumber = 1 — This parameter determines the last candle till which retracement will be plotted. Default value is 1 – this is the last candle on the chart (0 is the current candle). The current candle is not completed yet. So if we set this parameter to 0, we should be ready for redraw.
Trend break parameters — Adjustable Parameters for Trend Breakthrough.
- TrendBreakEndLevel = 0.618 — Level to break through to "cancel" a trend. Retracement plotting is checked for breakthrough of this level. Its default value is 61.8 according to V.Pershikov.
- TrendBreakCandlePercent = 100 — Part of a candle body as percentage, which must be broken through by the specified level of trend cancellation to record such cancellation. Attention! According to V.V.Pershikov this percentage is 66%. Default value is 100%. That means that the entire body of the candle must be above/below the level.
- ShowAdditionalLevels = false – if set to True, it shows additional levels: 76.4, 85.4, 91.
Further, there are setting parameters for plotting retracements for each timeframe. I will describe settings for H1, other timeframes are set similarly.
- NameH1 = "PRH1" – Name of Fibonacci line object
- TrendMinBarsH1 = 10 – Minimum allowed number of H1 bars in the trend according to which retracement is plotted
- TrendMaxBarsH1 = 400 – Maximum number of H1 bars to plot retracement
- TrendMinSizeH1 = 0 – Minimum number of pips in the trend (particularly pips, not points, i.e. for 1.10182 point of EURUSD the fourth digit is 8, and pips for the fifth digit is 2). If there are less pips, the trend is considered to be absent.
- FiboColorH1 = Purple – Retracement color. We took default value according to V.Pershikov
- FiboStyleH1 = 0 – Style of retracement lines (dashed, dot-and-dash)
- FiboWidthH1 = 1 – Width of retracement lines
- BreakCheckStep = 1 — Parameter influencing on productivity. Trend breakthrough is calculated not on every candle but in a number of candles specified in the parameter. If there are no any productivity problems, leave default value.