Login / Register
Add a review
Log in
Sign UP
[bws_google_captcha]
Divergence Macd Rsi

0.00

This Expert Advisor finds divergences and opens a buy or sell position taking into account the input parameters set by the user. Positions are opened after a divergence is detected and a pullback signal is triggered. The condition for the occurrence of divergence is the price movement in a direction other than the MACD and RSI. The type of divergences and the frequency of their detection completely depend on the input parameters entered by the user. 
Features
  • Functions for any symbol or periodicity.
  • You can set the type of divergence that the Expert Advisor will detect using input parameters (the number of candles between the highs or lows, the duration of the trend, etc.).
  • The volume of each transaction can be changed.
  • You can configure the technical indicators MACD, RSI and EMA used to determine the trend.
  • The take profit and stop loss of each trade are dynamically calculated so that the use of divergence is optimal.
  • The Expert Advisor can be configured in such a way that it does not trade, but acts as a technical indicator, displaying detected divergences.
  • When a divergence is detected, the Expert Advisor draws it on the chart using lines that can be changed.
  • The user can activate sending notifications to his mobile device in order to receive information about completed transactions.
  • Using the input parameters, the Expert Advisor can be instructed to use breakeven or several take profits.

[spoiler title=”Read More…”]

  • Functions for any symbol or periodicity.
  • You can set the type of divergence that the Expert Advisor will detect using input parameters (the number of candles between the highs or lows, the duration of the trend, etc.).
  • The volume of each transaction can be changed.
  • You can configure the technical indicators MACD, RSI and EMA used to determine the trend.
  • The take profit and stop loss of each trade are dynamically calculated so that the use of divergence is optimal.
  • The Expert Advisor can be configured in such a way that it does not trade, but acts as a technical indicator, displaying detected divergences.
  • When a divergence is detected, the Expert Advisor draws it on the chart using lines that can be changed.
  • The user can activate sending notifications to his mobile device in order to receive information about completed transactions.
  • Using the input parameters, the Expert Advisor can be instructed to use breakeven or several take profits.

Input parameters

Input parameters

Managing the number of candles:
  • ncandles: The number of candles on which the algorithm is looking for divergence. 
  • crossClavOffset: The maximum number of candles before the clavicle price crosses. If the price does not cross the collarbone for the number of candles less than this parameter since the divergence was detected, the possible entry is canceled.
  • minCandleOffset: The minimum number of candlesticks that can be between two highs or lows.
  • ncandlesTrend: The minimum number of consecutive candles in which the price has been trending, i.e. at a value of 20, divergence will not be detected if the price has not been trending for 20 candles or more, bearish or bullish, depending on the type of divergence.
  • maxPBoffset: After the price cuts through the collarbone, it waits for a pullback to enter, this parameter sets the maximum distance in candles between the intersection with the collarbone and the pullback.
  • ncandles: The number of candles on which the algorithm is looking for divergence. 
  • crossClavOffset: The maximum number of candles before the clavicle price crosses. If the price does not cross the collarbone for the number of candles less than this parameter since the divergence was detected, the possible entry is canceled.
  • minCandleOffset: The minimum number of candlesticks that can be between two highs or lows.
  • ncandlesTrend: The minimum number of consecutive candles in which the price has been trending, i.e. at a value of 20, divergence will not be detected if the price has not been trending for 20 candles or more, bearish or bullish, depending on the type of divergence.
  • maxPBoffset: After the price cuts through the collarbone, it waits for a pullback to enter, this parameter sets the maximum distance in candles between the intersection with the collarbone and the pullback.

MACD Configuration:

MACD Configuration:

  • fastEmaPeriod: Period for fast EMA MACD.
  • slowEmaPeriod: The period for the slow MACD EMA.
  • signalPeriod: The period for the MACD signal.
  • fastEmaPeriod: Period for fast EMA MACD.
  • slowEmaPeriod: The period for the slow MACD EMA.
  • signalPeriod: The period for the MACD signal.

RSI Configuration:

RSI Configuration:

  • rsiPeriod: The period for the RSI.
  • rsiPeriod: The period for the RSI.

The EMA period to determine the trend:

The EMA period to determine the trend:

  • emaPeriodFast: A period for a fast EMA to determine the trend.
  • emaPeriodSlow: A period of rapid EMA to determine the trend.
  • emaPeriodFast: A period for a fast EMA to determine the trend.
  • emaPeriodSlow: A period of rapid EMA to determine the trend.

Volume management:

Volume management:

  • volume: The volume set for each transaction.
  • volume: The volume set for each transaction.

Price ratio management:

Price ratio management:

  • minPriceOffsetPerc: In the case of bullish divergence, the minimum ratio when dividing the second minimum by the first. minmin2/minimum1> 1 minPriceOffsetPerc.
  • minDifferenceMaxMin: Out of two consecutive highs or lows of divergence, (In case of bearish divergence) this parameter sets the minimum ratio between the second high and the minimum between the first and second high. At a value of 0.1, max2/min > 1 0.1 .
  • minPriceOffsetPerc: In the case of bullish divergence, the minimum ratio when dividing the second minimum by the first. minmin2/minimum1> 1 minPriceOffsetPerc.
  • minDifferenceMaxMin: Out of two consecutive highs or lows of divergence, (In case of bearish divergence) this parameter sets the minimum ratio between the second high and the minimum between the first and second high. At a value of 0.1, max2/min > 1 0.1 .

General Settings:

General Settings:

  • useBreakEven: Uses breakeven in trading (only if multiple take profit is enabled).
  • useMultipleTp: Sets two levels of take profit, initial and intermediate.
  • macdDivergenceMargin: Held at 0 for normal operation, allows you to confirm the divergence for an obviously flat MACD. If x1 and x2 are the MACD at the first and second highs, then at x1 = 40 and x2 = 42 there will be a divergence, as with x1 = -66 and x2 = -67.
  • MagicNumber: A magic number.
  • sendNotification: If enabled, the user will receive push notifications on his mobile phone about concluded transactions.
  • enableTrading: If enabled, the EA makes buy/sell trades, otherwise it acts as a divergence detector.
  • useBreakEven: Uses breakeven in trading (only if multiple take profit is enabled).
  • useMultipleTp: Sets two levels of take profit, initial and intermediate.
  • macdDivergenceMargin: Held at 0 for normal operation, allows you to confirm the divergence for an obviously flat MACD. If x1 and x2 are the MACD at the first and second highs, then at x1 = 40 and x2 = 42 there will be a divergence, as with x1 = -66 and x2 = -67.
  • MagicNumber: A magic number.
  • sendNotification: If enabled, the user will receive push notifications on his mobile phone about concluded transactions.
  • enableTrading: If enabled, the EA makes buy/sell trades, otherwise it acts as a divergence detector.

[/spoiler]

Add review
Reviews ( 0 ):