int init() {
SetIndexBuffer(0, Uptrend);
SetIndexStyle(0, DRAW_ARROW, EMPTY, 2, SkyBlue);
SetIndexArrow(0, 158);
SetIndexLabel(0, "NgepeBarak");
SetIndexEmptyValue(0, 0);
SetIndexBuffer(1, Dntrend);
SetIndexStyle(1, DRAW_ARROW, EMPTY, 2, Gold);
SetIndexArrow(1, 158);
SetIndexLabel(1, "WendiNgony");
SetIndexEmptyValue(1, 0);
return (0);
}
int deinit() {
return (0);
}
int start() {
double ld_8;
double ld_24;
double ld_32;
bars = Bars;
int li_4 = bars - g_period_76;
for (int i = li_4; i >= 0; i--) {
ld_8 = Konyil * iATR(NULL, 0, g_period_76, i);
ld_24 = Close[i + 1] + ld_8;
ld_32 = Close[i + 1] - ld_8;
if (direction == "DOWN" && Close[i] > Dntrend[i + 1]) direction = "TrendUp";
if (direction == "TrendUp" && Close[i] < Uptrend[i + 1]) direction = "DOWN";
if (direction == "DOWN") {
if (ld_24 < Dntrend[i + 1] || Dntrend[i + 1] == 0.0)
Dntrend[i] = ld_24;
else Dntrend[i] = Dntrend[i + 1];
Uptrend[i] = EMPTY_VALUE;
}
if (direction == "TrendUp") {
if (ld_32 > Uptrend[i + 1] || Uptrend[i + 1] == 0.0)
Uptrend[i] = ld_32;
else Uptrend[i] = Uptrend[i + 1];
Dntrend[i] = EMPTY_VALUE;
}
}
return (0);
}
- Indicators with alerts/signal
- please code this indicator to alert by sound when displaying buy and sell signal..
- Coding help

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register