Last updated
Last updated
MACD The Moving Average Convergence Divergence (MACD) is a trend-following momentum indicator that shows the relationship between two moving averages of an asset price. Generally, the MACD line is calculated by subtracting the 26-period Exponential Moving Average (EMA) from the 12-period EMA.
Additionally, the MACD has a signal line (usually a 9-day EMA of the MACD itself). When the MACD line crosses above or below the signal line, buy and sell signals are generated respectively.
Divergences between MACD signals and price can be used to indicate trend reversals.
Specifies data source used for the MACD calculation:
Open - open price
High - highest price
Low - lowest price
Close - closing price
Hl2 - average of high + low price (H+L/2)
Hlc3 - average of high + low + close price (H+L+C/3)
Ohlc4 - average of open + high + low + close price (O+H+L+C/4)
Hlcc4 - average of high + low + double-weighted close (H+L+C+C/4)
Traditionally, the MACD line is calculated by subtracting the 26-period Exponential Moving Average (EMA) of asset price from the 12-period EMA. However, Vikings allows different combinations of fast and slow moving averages.
Sets the lookback period used to calculate the fast EMA used in the MACD calculation. Decreasing this value will make the MACD more sensitive to short-term price fluctuations and vice versa. The setting can be used to ‘fine-tune’ signals.
An average of the MACD line is used to produce a signal line. This line is used as a threshold for identifying bullish or bearish trends. When the MACD line crosses above or below the signal line, buy and sell signals are generated respectively.
Specifies the minimum price volatility required for Vikings to fire signals. Higher values will reduce the sensitivity of the algorithm to price fluctuations making signals less frequent, but more reliable. This may prove useful in choppy market conditions.
Specifies the minimum acceleration volatility required for Vikings to fire signals. Higher values mean price fluctuations that lack sufficient acceleration will not generate signals. This will make signals less frequent, but more reliable which may prove useful in choppy market conditions.
Elements of other loaded indicators can also be set as a Source. This allows the use of Lendal Visualizers as factors.
Specifies the higher timeframe on which MACD is calculated. If a value other than ‘chart’ is set, this will override the setting in the section.
The Higher Timeframe trailer analyzes macro trends over 1000 candles at the resolution of the current timeframe in TradingView. The maximum lookback period must be considered when selecting a Higher Timeframe. See the section for details.
Sets the type of MACD strategy the algorithm will use. Baseline strategies suit continuous trading, whereas scalping strategies may be used to trade breakouts. Acceleration or price action analysis can be selected within each strategy type. Scalping strategies work best when is set to ‘real-time’. However, this setting should be set to 'confirmed' when bot trading due to the risk of signal repainting when using real-time data.
This setting specifies presets for the length of the and used to calculate MACD. Presets with longer moving averages will make Vikings less sensitive to volatility resulting in fewer, more reliable signals and vice versa.
See the section for detail on how the Fast EMA is used in the MACD calculation.
Sets the lookback period used to calculate the slow EMA used in the MACD calculation. Increasing this value will smooth MACD movement, making it less sensitive to changes in price. This can be used to 'roughly tune' the algorithm, before 'fine-tuning' signals by adjusting the .
See the section for detail on how the Slow EMA is used in the MACD calculation.
Increasing signal smoothing will make the indicator less sensitive to market volatility and vice versa. However, this effect will be more subtle than adjusting the and values.
See the section for further detail on the MACD calculation.
Specifies which volatility mode will be used if or is activated. The Advanced Trend Catcher mode is more sensitive to fluctuations in volatility and will likely require and settings applied to achieve reliable results. Volatility detection based on the width of the Bollinger Band technical indicator can also be activated as a global function in the section. Global volatility detection operates independently of volatility settings within individual factions.
Specifies the amount of smoothing applied to and calculations. Higher values will make the algorithm less sensitive to fluctuations in volatility.
Specifies the number of adjacent candles that will be impacted by . Higher values will make the algorithm less sensitive to fluctuations in volatility.
Specifies if the and settings will be adjusted manually or set to a short, medium, or long-term preset.
Sets the number of lookback periods used to calculate .
Sets the standard deviation used in the MACD trend calculation. Generally, Price Action Deviation (sd) should be increased as (p) is increased. e.g. p = 10, sd = 1.9; p = 20, sd = 2; p = 50, sd = 2.1. However, these settings may not suit some assets.
This specifies a ‘slippage threshold’ that must be exceeded before a MACD signal is fired. This percentage can be increased to reduce false-positive signals if they occur too frequently. This setting only applies if Price Action Scalper or Price Action Baseline is selected under the setting.
Specifies if and will be set manually or to a short, medium, or long-term strategy preset.
Sets the number of lookback periods used to calculate .
Sets the standard deviation to be used in the acceleration calculation. Generally, Acceleration Deviation (ad) should be increased as (p) is increased. e.g. p = 10, sd = 1.9; p = 20, sd = 2; p = 50, sd = 2.1. However, these settings may not suit some assets.
This creates a ‘slippage threshold’ that must be exceeded before an acceleration signal is fired. This percentage can be increased to reduce false-positive signals if they occur too frequently. This setting only applies if Acceleration Scalper or Acceleration Baseline are selected under the setting.
Volatility detection based on the width of the Bollinger Band technical indicator can also be activated as a global function in the section. Global volatility detection operates independently of volatility settings within individual factions.
Volatility detection based on the width of the Bollinger Band technical indicator can also be activated as a global function in the section. Global volatility detection operates independently of volatility settings within individual factions.
The Vikings algorithm determines trend direction based on the Moving Average Convergence/Divergence (MACD) technical indicator.