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 Indicator | Swing_Shift

Oscillator Swing Shift displays the MA slope value exceeding the pre-defined threshold and the change in the moving average movement direction as a pulse-changing direction of the indicator histogram.

It has four configurable parameters:

  • Period - calculation period
  • Method - calculation method
  • Applied price - calculation price
  • Threshold - MA slope value threshold

Calculations:

  

SS = 100.0 * (MA - Anchor) / Anchor

where:

  • If Slope > Threshold и PrevTrend < 1
    Anchor = MA  Trend = 1  
  • Otherwise, if Slope < - Threshold и PrevTrend > 0
    Anchor = MA  Trend = 0  
  • Otherwise
    Anchor = PrevAnchor  Trend = PrevTrend  
  

Slope = (MA - PrevMA)*Point

MA = MA(Applied price, Period, Method)

MetaTrader Experts, Indicators, Scripts and Libraries

Fig 1. Indicator Swing Shift with default settings

MetaTrader Experts, Indicators, Scripts and Libraries

Fig. 2. Swing Shift and a comparative MA with the same settings

21330

Best MetaTrader Indicators + Profitable Expert Advisors