divergence petr
Info
The divergence petr is a Indicator for MetaTrader 4 that the indicator to trade divergence. one of 30 oscillators can be selected for the detection of the divergences.
Usage
This tool is typically used for enhancing chart analysis and decision making.
Platform
This Indicator works exclusively on MetaTrader 4 (both build 600+ and newer versions).
Setup
Place the downloaded file in MQL4/Indicators folder via File ? Open Data Folder in MetaTrader 4.
How to Install and Use divergence petr
1. Installation: Place your file in the MQL/Indicators folder via "Open Data Folder" and restart your terminal.
2. Loading: Find the indicator in the Navigator, drag it onto your chart, and configure the input parameters in the popup window.
3. Customization: Press Ctrl+I to open the indicator list, select your tool, and click "Properties" to change colors, levels, or visual styles.
4. Updating: Replace the old file in the Indicators folder with the new version and restart the platform to apply changes.
Frequently Asked Questions
Q: Why is my indicator not showing? A: Verify the file is in the MQL/Indicators folder, or try right-clicking the "Indicators" tree in the Navigator and clicking "Refresh."
Q: Do custom indicators slow down the platform? A: Too many complex indicators can impact performance; remove unused ones via the "Indicator List" (Ctrl+I).
Q: Can I use MT4 indicators on MT5? A: No, MQL4 and MQL5 are distinct languages; ensure the indicator is compiled specifically for your platform version.
What this tool does
the indicator to trade divergence.
Typical Use Case
This Indicator excels in automated trading and technical analysis on MetaTrader 4.
Compatible Platform & Setup
This Indicator works on MetaTrader 4. Place the file in the MQL4/Indicators folder and restart the terminal.
Description & Settings
Related: moving average convergence divergence (macd) - another powerful indicator for MetaTrader 4 traders.
the indicator to trade divergence.
Also recommended: fx5 divergence indicator - similar indicator with strong performance on MetaTrader 4.
one of 30 oscillators can be selected for the detection of the divergences.indicator values:
extremes as points (red — highs, yellow — lows);
divergence using the segments connecting the extremes;
the support/resistance lines as rays passing through the extremes;
channels as rays.
selection of the required oscillator is performed in the line by entering the oscillator number — the osc parameter. by default, the rsi indicator is set (number 29).
oscillator selection:
volume
close
open
high
low
(h+l)/2
(h+l+c)/3
(h+l+c+c)/4
(o+c+h+l)/4
(o+c)/2
... relative strength index
the list of adjustable parameters:
osc=29 — the number of the oscillator;
th=true — bearish divergence;
tl=true — bullish divergence;
trend=true — support/resistance lines;
convergen=true — hidden divergence;
complect=1 — the distinguishing index of the indicator on the chart;
backsteph=0 — number of steps back h;
backstepl=0 — number of steps back l;
backstep=0 — number of steps back;
qsteps=1 — number of displayed steps, no more than three;
levdpl=5 — demark level points (2 = the central bar will be above (below) the two bars on the left);
levdpr=1 — demark level points (2 = the central bar will be above (below) the two bars on the right);
period=8 — period for iadx, iatr, ibearspower, ibullspower, icci, idemarker, iforce, imomentum, imfi, irvi, istddev, irsi, irsi, iwpr;
ma_method=0 — averaging method for istochastic, istddev, iforce;
ma_shift=0 — ma shift for istddev;
applied_price=4 — applied price for irsi, irsi, istddev, iobv, iosma, imacd, imomentum, iforce, icciibullspower, ibearspower, iadx;
mode=0 — line index for istochastic, irvi, imacd, iadx;
fast_ema_period=12 — fast ma period for iosma, imacd;
slow_ema_period=26 — slow ma period for iosma, imacd;
signal_period=9 — signal line period for iosma, imacd;
kperiod=13 — k line period for istochastic;
dperiod=5 — d line period for istochastic;
slowing=3 — slowing for istochastic;
price_field=0 — applied price for istochastic;
showbars=1000 — if = 0, the indicator is displayed for the entire chart;
trend_down=true — resistance lines;
trend_up=true — support lines;
trendline=true — support/resistance lines;
handycolour=true;
highline=red — hl channel color;
lowline=deepskyblue — ll channel color;;
channelline=false — channels parallel to trend lines;
trend=0 — 1 = only for uptrendlines, -1 = only for downtrendlines, 0 = for all trendlines;
channel=false — channels;
regression=true — linear regression channel, false — standard deviation channel;
rayh=true — ray for the high channel;
rayl=true — ray for the low channel;
channelh=red — color of the high channel;
channell=deepskyblue — color of the low channel;
std_widthh=1.0 — deviation size for the channel high object;
std_widthl=1.0 — deviation size for the channel low object;
comment=false — display comments;
code=159 — character code of the wingdings font to display the extremums;
buystop=false — buystop levels;
selllimit=false — selllimit levels;
sellstop=false — sellstop levels;
buylimit=false — buylimit levels.
examples:
recommendations:
the color of the oscillator and the extremum points can be configured in the colors tab.
change the complect parameter when attaching more than one indicator to the chart.
You may also like: fx5 divergence indicator - excellent alternative for indicator users on MetaTrader 4.
Source Code
#property copyright "robotfx"
#property link "https://robotfx.org"
#property description "this code is educational. feel free to use, modify and upgrade as you wish. visit robotfx.org for professional trading tools"
#property description "this code is educational. feel free to use, modify and upgrade as you wish. visit robotfx.org for professional trading tools"
#property stacksize 16384
#property indicator_separate_window
#property indicator_level1 75
#property indicator_level2 50
#property indicator_level3 25
#property indicator_level4 0
.......
⚠ Limitations & Risk Warning
- This tool is provided for educational and testing purposes only.
- Past performance does not guarantee future results.
- Trading involves substantial risk of loss. Use on a demo account first.
- Results may vary depending on market conditions, broker, and settings.
- We recommend thorough backtesting and forward testing before using with real funds.